Download MetaTrader 5

what is the difference between using the MarketInfo(...) and Bid ?

To add comments, please log in or register
Mohammad Soubra
30883
Mohammad Soubra  

Hello

hope this week was great

 

below, there are two orders of selling a pair (same current pair)

but the question is:

what is the difference between using the MarketInfo(...) and Bid  ?

 

//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick()
  {
   int result0 = OrderSend(Symbol(),OP_SELL,0.01,MarketInfo(Symbol(),MODE_BID),3,NULL,NULL,"MARKETINFO",NULL,0,clrRed);
   int result1 = OrderSend(Symbol(),OP_SELL,0.01,Bid,3,NULL,NULL,"Bid",NULL,0,clrRed);
  }
//+------------------------------------------------------------------+
Marco vd Heijden
Moderator
5491
Marco vd Heijden  
Bid

it is related to the chart symbol().

but if you want to know the bid of another symbol other then the chart symbol you use

MarketInfo(Symbol(),MODE_BID)

where symbol() could be different a different symbol, then the chart symbol().

Osama Shaban
1576
Osama Shaban  

Using MarketInfo( ) gives you the choice to call any Bid price for any symbol and also using it in line with the OrderSend( ) will call prompt

Bid price, which means you almost will not have re-quotes in order execution.

Using MarketInfo( ) in fast scalpers has big advantage to get best results.

To add comments, please log in or register