Download MetaTrader 5

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

To add comments, please log in or register
Deposit to your account via WebMoney
Mohammad Soubra
25004
Mohammad Soubra 2016.04.15 22:06 

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
4704
Marco vd Heijden 2016.04.15 22:18  
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
1448
Osama Shaban 2016.04.15 23:09  

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