Download MetaTrader 5

Executing two trades at the same time... How to fix it?

To add comments, please log in or register
Sell your applications via the Market. It is secure!
bnirmalsingh
19
bnirmalsingh 2016.09.07 07:35 
Hereby I have attached the code. when it is executed, two continuous trades are executed.. I don't know where the mistake occurs. How to fix the issue?
Files:
sample22.mq4 4 kb
Daniel Krebs
728
Daniel Krebs 2016.09.07 08:31  

I believe that the issue is with the SAR calculation? Do you want the value of the current or the previous bar. Try replacing 0 with 1 and see how you go.

dIsar = iSAR("EURUSD",NULL,0.02, 0.20, 1); 

To add comments, please log in or register