renen:
Hallo I''m working on a trailingstop wich isnt sent to the broker everytime a better stoploss is possable. The problem I have is that the EA now Opens and closes orders in rappid fire. can someone help me?
This code . . .
for(int i=0; i<total; i++) // start loop tellen voor het achterhalen vah ordernummer vanaf 0 tot ordernummergevon OrderSelect(i,SELECT_BY_POS,MODE_TRADES);
. . . selects the orders one by one and when it gets to the last one . . . this code, and the code following it, is executed . .
double orderopenprice=OrderOpenPrice();
You haven't shown any code which opens Orders so we can't comment on any "rapid fire" order opening.
This code doesn't do what you probably intended it to do . . .
if (Bid <= STOP) // if Bid <= STOP . . . RefreshRates(); // do this line OrderClose(OrderTicket(),OrderLots(),Bid,3,Red); // this line is executed regardless of the if statement above
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
Hallo I''m working on a trailingstop wich isnt sent to the broker everytime a better stoploss is possable. The problem I have is that the EA now Opens and closes orders in rappid fire. can someone help me?