how to set ea to open multiple orders at once and allow open another order again when condition meet again even though the previous order still open on the same pair
Hello norazira ...
Please try my modified code ... It is not tested ... if there are any problems, just let me know ...
What I did ...
- Repeated the OrderSend( ) 5 times (once condition is met) ...
- I added 2 check functions for both Buy and Sell orders on same opened bar ... so, max possible orders to open on any bar are (5 + 5) ... ExistPositionsBuy( ) and ExistPositionsSell( ) ...
- Removed all possible compiler warnings ...
- Removed TotalOrdersCount( ) as it is not needed any more ...
- Added EA_Name in the EA external settings to make it possible to name the EA in the Comments column the name you want ...
Please let me know how things went with you ...
Best wishes ...
O. Shaban
Files:
RSI_EA.mq4
8 kb
Osama Shaban:
Hello norazira ...
Please try my modified code ... It is not tested ... if there are any problems, just let me know ...
What I did ...
- Repeated the OrderSend( ) 5 times (once condition is met) ...
- I added 2 check functions for both Buy and Sell orders on same opened bar ... so, max possible orders to open on any bar are (5 + 5) ... ExistPositionsBuy( ) and ExistPositionsSell( ) ...
- Removed all possible compiler warnings ...
- Removed TotalOrdersCount( ) as it is not needed any more ...
- Added EA_Name in the EA external settings to make it possible to name the EA in the Comments column the name you want ...
Please let me know how things went with you ...
Best wishes ...
O. Shaban
thanks o. shaban,
appreciate your time and assistance. let me try it and let you know the outcome.
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
hi all,
i am newbie here and also not really good in programming but i have developed an ea using free online ea generator. the ea work well and meet my expectation in term of opening buy and sell entries based on my condition. however i figured it out that the ea will open only one order at one time per pair when condition meet either buy or sell and it will not open another order again even though condition is meet until the previous order is closed.
i need help or guide on modifying the ea so that it can:
attached is my ea file.