I also check the test code of this function, it should be ... distance ?
Thank you.
def __init__(self,
distance,
timeInForce=OD.TimeInForce.GTC,
gtdTime=None,
clientExtensions=None):
"""Instantiate TrailingStopLossDetails.
Parameters
----------
distance : float or string (required)
the price to trigger trailing stop loss order
timeInForce : TimeInForce (required), default TimeInForce.GTC
the time in force
gtdTime : DateTime (optional)
gtdTime is required in case timeInForce == TimeInForce.GTD
clientExtensions : ClientExtensions (optional)
Example
-------
>>> import json
>>> from oandapyV20 import API
>>> import oandapyV20.endpoints.orders as orders
>>> from oandapyV20.contrib.requests import (
>>> MarketOrderRequest, TrailingStopLossDetails)
>>>
>>> accountID = "..."
>>> client = API(access_token=...)
>>> # at time of writing EUR_USD = 1.0740
>>> # let us take profit at 1.10, GoodTillCancel (default)
>>> trailingStopLossOnFill = TrailingStopLossDetails(price=1.06)
>>> print(trailingStopLossOnFill)
{
"timeInForce": "GTC",
"price": "1.10000"
}
Hi,
In the file oanda-api-v20/oandapyV20/contrib/requests/onfill.py, the function TrailingStopLossDetails() has parameter
distance
, but the example code shows theprice
?I also check the test code of this function, it should be ...
distance
? Thank you.