Hi all,
I'm working on an EA, basicly it is to use horizontal line to stand for SL, Hline price touched then close order......multiple Hlines means SL for multiple open orders in current chart.
And I figured out a bug:
when in the process of for-loop of objectstotal(), what if new object created?(new order added, so new Hline created based on that) ---- my EA just wrongfully closed order using other order's SL(Hline) price.
How can I deal with this?
Any response would be appreciated.
I'm working on an EA, basicly it is to use horizontal line to stand for SL, Hline price touched then close order......multiple Hlines means SL for multiple open orders in current chart.
And I figured out a bug:
when in the process of for-loop of objectstotal(), what if new object created?(new order added, so new Hline created based on that) ---- my EA just wrongfully closed order using other order's SL(Hline) price.
How can I deal with this?
Any response would be appreciated.