Getting the symbol and order type of a placed order
You need to learn the difference between orders, deals, and positions.
And look at functions:
https://www.mql5.com/en/docs/trading/orderselect
- www.mql5.com
And look at functions:
https://www.mql5.com/en/docs/trading/orderselect
I am trying to create a chain of events whereby a buy or sell stop is detected on a higher timeframe H4 and another ea on a lower timeframe m30 reads the orders and places a buy or sell when conditions are met on the lower timeframe. So far this is what i came up with but still the second ea does not detect it;
int total= OrdersTotal();
for(int i=total;i>0;i--)
{
while ( OrderGetTicket(i) ) {
if(OrderGetString(ORDER_SYMBOL)==symbol)
{
int BUY=55;
}
else
{
BUY=0
}
}
}
}