here you go..fixed one
sorry again
-----------------OOPS !!
i added something more due to my backtest..when it ran into the server's max_lot the over-float will occour again
then i added the opening limit level to enable new order sent only if the acc.balance is less than the set limit
in this case the ea will only can close the floating position but open is disable
let me explain
-
BackTestLimit : is use for the testing mode only, the ea will be stopout when the acc.balance is reach maybe 1,000,000 like this
-
StopOutAt : this is for real test...10 means stop opening when acc.balance is 10 times the initial deposite, but if i coded something wrong it will return to the BackTestLimit .. (means if the StopOutAt not work, then the trade limit will equal to BackTestLimit

)
go ahead ppl