I want to open say 4 or 5 buy/sell trades at different price for the same pair and then use trailing stop to close them. Currently, my EA close the trades at different trailing price, but, I need all the open trades to be closed at the same trailing stop price of my first opened trade. For example, if my 1st trade is having a trailing stop at 1.39564, I need all of other open trades to have the same stop loss price.
- Help: How to write simple EA to buy and sell at a specific time?
- Trailing Stops and Trailing Profit
- [ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3.
Loop DOWN through all the orders and modify them
for(pos = OrdersTotal()-1; pos >= 0 ; pos--) if ( OrderSelect(pos, SELECT_BY_POS) // Only my orders w/ && OrderMagicNumber() == magic.number // my magic number && OrderSymbol() == Symbol() ){ // and my pair.
WHRoeder:
Loop DOWN through all the orders and modify them
Loop DOWN through all the orders and modify them
Dear WHRoeder:
Thank you very much, I will test it and update you. again, I appreciate your help and prompt respond.
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