In a auto trading code I sometimes move working orders.
For example in a trailing stop:
Code: Select all
var0 = LowestFC( Low, 5 ) ;
Sell ( "ChTrLX" ) next bar at var0 stop ;
So in order to get the same result as in the code above you would need to cancel the working order and create a new one at the latest level.
So, my question is if it's possible to code that ?
Something like:
Code: Select all
var0 = LowestFC( Low, 5 ) ;
If var0[0] <> var[1] then "cancel order"
Sell ( "ChTrLX" ) next bar at var0 stop ;
Cheers, Lars