You have chosen to sponsor your bid up to a maximum amount of .
Average True Range (ATR) Trailing Stops Technical Indicator for cAlgo API (which is based on C#).
Trailing stops are normally calculated relative to closing price:
Calculate Average True Range ("ATR")
Multiply ATR by your selected multiple e.g. 3 x ATR
In an up-trend, subtract 3 x ATR from Closing Price and plot the result as the stop for the following day
If price closes below the ATR stop, add 3 x ATR to Closing Price — to track a Short trade
Otherwise, continue subtracting 3 x ATR for each subsequent day until price reverses below the ATR stop
More documentation can be found by google search.