Hi guys i have coded EA trade management. It automatically set my trailing stops when it reach a certain percent on gain. To activate it i need to manually open a trade, after manually opening a trade i run the EA so it can adjust my trailing stops. It works perfectly on one pair. The problem comes when i add another pair and run the EA on the second pair while the the EA is running on the first pair. The second pair is not working.
- How to code?
- dont trade if more than 1 expert
- My ea opens multiple trades at a time
mark692:
Hi guys i have coded EA trade management. It automatically set my trailing stops when it reach a certain percent on gain. To activate it i need to manually open a trade, after manually opening a trade i run the EA so it can adjust my trailing stops. It works perfectly on one pair. The problem comes when i add another pair and run the EA on the second pair while the the EA is running on the first pair. The second pair is not working.
Hi guys i have coded EA trade management. It automatically set my trailing stops when it reach a certain percent on gain. To activate it i need to manually open a trade, after manually opening a trade i run the EA so it can adjust my trailing stops. It works perfectly on one pair. The problem comes when i add another pair and run the EA on the second pair while the the EA is running on the first pair. The second pair is not working.
my guess is the problem could be at line 78
CurrentOpenBuy = 0; for(int i=OrdersTotal()-1;i>= 0 ;i--) { if(OrderSelect(i, SELECT_BY_POS, MODE_TRADES)==true) { if(OrderSymbol()==Symbol() && OrderType() == OP_BUY) CurrentOpenBuy++; }
This code is suppose to count the current open buy trade, its works on the first pair/chart but when i run it to the second pair/chart it gives zero even i already add this on the code:
OrderSymbol()==Symbol()

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