ok thanks, added to the work que !
onis_uk:
Is there such a tool to move my stop to BE at a given price ?
I would ultimately like a line i can set like the take profit line, if price hits it stop is moved to entry price ..........
can anyone help me out?
cheers onis
//+------------------------------------------------------------------+ //Move to breakeven function //+------------------------------------------------------------------+ void MoveToBreakeven() { int buymod=0; int sellmod=0; for(int b=OrdersTotal()-1; b>=0; b--) { if(OrderSelect(b,SELECT_BY_POS,MODE_TRADES)) if(OrderSymbol()==Symbol()) if(OrderType()==OP_BUY) if(OrderOpenPrice()>OrderStopLoss()) if(Bid-OrderOpenPrice()>PipsToLockIn*pips) buymod=OrderModify(OrderTicket(),OrderOpenPrice(),OrderOpenPrice()+(PipsToLockIn*pips),OrderTakeProfit(),0,CLR_NONE); } for(int s=OrdersTotal()-1; s>=0; s--) { if(OrderSelect(s,SELECT_BY_POS,MODE_TRADES)) if(OrderSymbol()==Symbol()) if(OrderType()==OP_SELL) if(OrderOpenPrice()<OrderStopLoss()) if(OrderOpenPrice()-Ask>PipsToLockIn*pips) sellmod=OrderModify(OrderTicket(),OrderOpenPrice(),OrderOpenPrice()-(PipsToLockIn*pips),OrderTakeProfit(),0,CLR_NONE); } }

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
Is there such a tool to move my stop to BE at a given price ?
I would ultimately like a line i can set like the take profit line, if price hits it stop is moved to entry price ..........
can anyone help me out?
cheers onis