need help to modify ea to allow it open next order either buy or sell regardless how many orders are still floating on the same pair.

 

hi,

i am not really good in programming but i have developed one ea using free online ea generator. the ea work well as per my expectation by opening an order when condition meet and close when hit tp i  set. however this ea only open one order when condition meet and will not open another order again on the same pair event though condition meet until the previous order is closed or hit tp.

i need someone help to modify this ea so that it will continue opening an order every time the condition meet either buy or sell regardless how many orders are still floating on the same pair.

attached is my ea file.

Files:
RSI_EA.mq4  5 kb
 
norazira:

hi,

i am not really good in programming but i have developed one ea using free online ea generator. the ea work well as per my expectation by opening an order when condition meet and close when hit tp i  set. however this ea only open one order when condition meet and will not open another order again on the same pair event though condition meet until the previous order is closed or hit tp.

i need someone help to modify this ea so that it will continue opening an order every time the condition meet either buy or sell regardless how many orders are still floating on the same pair.

attached is my ea file.

Try out this version (use options to set it up to allow more than just one opened order)
Files:
 
mladen:
Try out this version (use options to set it up to allow more than just one opened order)

hi mladen,

thanks for your help. i will definately give a try.

 

hi mladen,

i have backtested your modified version.

what i figured out was:

  1. when i set AllowOnlyOneOpenedOrder=true, then the ea opened one order when the condition  was met but not open a new order event though condition was met again since there was another order still open or still floating on the same pair.
  2. when i set AllowOnlyOneOpenedOrder=false, then the ea opened multiple orders  at once when the condition was met and tried to open new order when next condition was met again but unfortunately can't due to not enough money since the previously multiple open orders used up all my money.

on 2nd option above what i figured out is that, the ea will keep opening new order on every ticks as long as condition still meet and the money in my account is still available, so that is why it opens a lot of orders when the 1st condition meet.

the ea should be set to open next new order only on new bar/candlestick (not on the same bar/candlestick where the 1st order was opened) instead of every new tick.

 
norazira:

hi mladen,

i have backtested your modified version.

what i figured out was:

  1. when i set AllowOnlyOneOpenedOrder=true, then the ea opened one order when the condition  was met but not open a new order event though condition was met again since there was another order still open or still floating on the same pair.
  2. when i set AllowOnlyOneOpenedOrder=false, then the ea opened multiple orders  at once when the condition was met and tried to open new order when next condition was met again but unfortunately can't due to not enough money since the previously multiple open orders used up all my money.

on 2nd option above what i figured out is that, the ea will keep opening new order on every ticks as long as condition still meet and the money in my account is still available, so that is why it opens a lot of orders when the 1st condition meet.

the ea should be set to open next new order only on new bar/candlestick (not on the same bar/candlestick where the 1st order was opened) instead of every new tick.

You asked that multiple orders should be allowed (to remind the request :)

norazira:

......

i need someone help to modify this ea so that it will continue opening an order every time the condition meet either buy or sell regardless how many orders are still floating on the same pair.

That is what has been done. The rest is up to the code of that EA

 
mladen:

You asked that multiple orders should be allowed (to remind the request :)

That is what has been done. The rest is up to the code of that EA

hi mladen,

thanks for your explanation.  i am still testing on this ea. thanks again anyway

Reason: