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
extern string Symbol_1 = "EURUSDm";
extern string Symbol_2 = "USDCHFm";
for(cnt = OrdersTotal(); cnt >= 0; cnt--)
{
OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);
if(OrderSymbol()==Symbol())
{
if((MarketInfo(Symbol_1,MODE_BID)-OrderOpenPrice()) + (MarketInfo(Symbol_2,MODE_BID)-OrderOpenPrice())>TakeProfit*Point ||
(MarketInfo(Symbol_1,MODE_BID)-OrderOpenPrice()) - (MarketInfo(Symbol_2,MODE_BID)-OrderOpenPrice())>TakeProfit*Point ||
(MarketInfo(Symbol_2,MODE_BID)-OrderOpenPrice()) - (MarketInfo(Symbol_1,MODE_BID)-OrderOpenPrice())>TakeProfit*Point)
{
OrderClose(OrderTicket(),OrderLots( ),Bid,3,Violet);
return(0);
}
}
}
return(0)