On the chart it displays the right ordername of the trailing stoploss after it is activated, but in the order and position tracker it displays the ordername of the initial stoploss.
It looks like the order and position tracker can not see the difference between stoplosses with another ordername. Because if I use for example a stoploss limit for the trailingstop then it will display the right ordername (due to the difference of stop and stop limit). The chart however can see the difference between stoploss ordernames.
Is this something I need to change in my code or is it a little bug in the order and position tracker?
Code: Select all
// initial stoploss
if (MP = 1) and (trailingstop = false) then begin
Sell ("LX-initial stoploss") next bar at exitprice stop;
end;
// trailing stoploss
If trailingstop = true then begin
If MP = 1 then begin
Sell ("LX-trailingstop") next bar at trailingstop_Exit stop;
end;
end;