Getting the symbol and order type of a placed order

 
hello programmers, this a basic question that i haven't been able to crack, how can i find the symbol and order type of a placed order among numerous placed orders?
 
You need to learn the difference between orders, deals, and positions.
 
William Roeder #:
You need to learn the difference between orders, deals, and positions.

And look at functions:

https://www.mql5.com/en/docs/trading/orderselect

https://www.mql5.com/en/docs/trading/ordergetinteger

https://www.mql5.com/en/docs/trading/ordergetstring

Documentation on MQL5: Trade Functions / OrderSelect
Documentation on MQL5: Trade Functions / OrderSelect
  • www.mql5.com
OrderSelect - Trade Functions - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
 

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

      }

 

      }

      }

      }

Reason: