base on the code the position will keep on open if the price keep on going up. The problem is how should i modify the previous t/p open position to the latest t/p open position. Thanks in advance!
Files:
please.txt
2 kb
- How to modify s/l or t/p in mql4?
- Getting open position details
- how to keep previous orders opened after open new ones ?
void modifyorder()
{
for( i=OrdersTotal(); i>=0; i--)
{
if (OrderSelect(i,SELECT_BY_POS,MODE_TRADES)==true && OrderSymbol()== Symbol() && OrderMagicNumber()!=MAGICMA)
{
OrderModify(OrderTicket(),0,0,0,0,Blue);
}
}
}

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