Semi Manual EA
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
- Question about Magic Numbers (and managing manually-placed trades automatically)
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()