Topics
Replies

firemyst
26 Mar 2019, 16:02

Thank you for your reply, but that's not what I meant. :-)

In the "OnTick" method, after I place an order:

ExecuteMarketOrder(TradeType.Buy, Symbol, PositionSize, MyLabel, StopLossInPips, null, null, null, true);

I had an area of code that gets run through if I have at least 1 open position:

if (Positions.Count > 0)
                    {
                        Position position = Positions[0];
                        Print("Stoploss: {0},", position.StopLoss);
                    }

 

The value of position.StopLoss never seemed to change, even though I can see the trailing stop loss move on the chart in backtest mode.

 

However, I've since managed ot figure out my issue - I wasn't looking at the correct times in the log. Doh! :-) 

Anyway, I appreciate your response :-)

 


@firemyst