Scale Out Function after Time - page 2

 
Fx90: Thanks a lot, but it doesnt work (at least in my code..) . I tried it before your help in a similar way, but in the backtest it isnt noted.
datetime barExit  = Time[0] + _Period*60*10 - 1;
If you used Gooly's code, it wouldn't because barExit isn't saved - not static or globally declared.
 
thx i understand it now and used a loop for the Orderselect... it works now