Forum

ModifyOrder Problem...

Hey! Im having problems with the ModifyOrder(); I have my strategy that sends Shorts and Longs of 2 kinds each, and when its come to a certain point, I want to modify the SL to the Open price . I think the problems comes when I call the trade open in the next way. ( OrderSelect

I need a counter that restart everytime i close a trade.

static int counter; static datetime hour; if (hour!= iTime ( NULL , PERIOD_H1 , 0 )) {counter++; hour= iTime ( NULL , PERIOD_H1 , 0 )II I need to set the counter on 0 every time I close a trade... I tried to do this... but i think when the trade close, also the if statement... if (