Download MetaTrader 5

Help! Where can I find the indicator about ask-bid shower?

To add comments, please log in or register
air-seller
28
air-seller 2013.10.08 05:55 

I use MT4 a indicator about "ask-bid shower”, it is show price in big figure, but I cannot get it when I turn to MT5,who know how to get it? it is on  left up position of below picture

 

 

 

 

 

 MT4 code is : 

 

 // Code Modifications: FILE45 -
#property indicator_chart_window

// ASK+BID+SPREAD-INDI

// USERS CAN PERMANENTLY CHANGE THE DEFAULT SETTINGS BY MODIFYING THE BELOW CODE OPTIONS

// * * * * * REMEBER TO COMPILE AND CHECK FOR ERRORS AFTER EVERY MODIFICATION * * * * *

// ++++++++++++++++++++++++++++++++ START OF DEFAULT OPTIONS ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// Spread
extern string SPREAD_OPTIONS;
extern color  Spread_Color = DarkOrange;
extern int    Spread_Font_Size = 28;
extern string Spread_Font_Type = "Verdana";
extern int    Spread_Corner = 4;
extern int    Spread_X_distance = 240;
extern int    Spread_Y_distance = 40;
extern bool   Spread_HIDE=false;
extern bool   Spread_Normalize = false; //If true then spread normalized to traditional pips
//extern string _;
extern string ASK_BID_OPTIONS;
extern color  Ask_Color = LimeGreen;
extern color  Bid_Color = Orchid;
extern int    Ask_Bid_Font_Size=30;
extern string Ask_Bid_Font_Type = "Verdana";
//extern int    Ask_Bid_Corner = 4;
extern int    Ask_X_Distance = 20;
extern int    Bid_X_Distance = 20;
extern int    Ask_Y_Distance = 15;
extern int    Bid_Y_Distance = 70;
extern bool   Ask_HIDE = false;
extern bool   Bid_HIDE = false;
extern bool   Ask_Bid_HIDE = false;
// +++++++++++++++++++++++++++++++++++++ END OF DEFAULT OPTIONS ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

double Pointx;
int x_digits = 0;
double divider = 1;

int init(){
  
   //Spread: Check for 3 & 5 digit
   if (Point == 0.00001) Pointx = 0.0001; //5 digits
   else if (Point == 0.001) Pointx = 0.01; //3 digits
   else Pointx = Point; //Normal
  
   if ((Pointx > Point) && (Spread_Normalize==true))
   {
      divider = 10.0;
      x_digits = 1;
   }
  
   double spread = MarketInfo(Symbol(), MODE_SPREAD);
 
   return(0);
}

int deinit(){
   // Spread: delets
   ObjectDelete("Spread"); 
   // Market: Ask - Bid deletes
   ObjectDelete("Market_Bid_Label");
   ObjectDelete("Market_Ask_Label");
 
   return(0);
}

int start(){
  
   // Spread: refresh
  
   if(Spread_HIDE==false){
   RefreshRates();
   double spread = (Ask - Bid) / Point;
   ObjectCreate("Spread",OBJ_LABEL,0,0,0);
   ObjectSetText("Spread", " " + DoubleToStr(NormalizeDouble(spread / divider, 1), x_digits), Spread_Font_Size, Spread_Font_Type, Spread_Color);
   ObjectCreate("Spread", OBJ_LABEL, 0,0,0 );
   ObjectSet("Spread", OBJPROP_CORNER, Spread_Corner);
   ObjectSet("Spread", OBJPROP_XDISTANCE, Spread_X_distance);
   ObjectSet("Spread", OBJPROP_YDISTANCE, Spread_Y_distance);}
      
   // Prcie: Ask
   if(Ask_Bid_HIDE == false){
   if(Ask_HIDE == false){
   string Market_Ask = DoubleToStr(Ask, Digits);
   ObjectCreate("Market_Ask_Label", OBJ_LABEL, 0, 0, 0);
   ObjectSetText("Market_Ask_Label", Market_Ask, Ask_Bid_Font_Size, Ask_Bid_Font_Type, Ask_Color);
   ObjectSet("Market_Ask_Label", OBJPROP_CORNER, Spread_Corner);
   ObjectSet("Market_Ask_Label", OBJPROP_XDISTANCE, Ask_X_Distance);
   ObjectSet("Market_Ask_Label", OBJPROP_YDISTANCE, Ask_Y_Distance);}
   
   // Price: Bid
   if(Bid_HIDE == false){  
   string Market_Bid = DoubleToStr(Bid, Digits); 
   ObjectCreate("Market_Bid_Label", OBJ_LABEL, 0, 0, 0);
   ObjectSetText("Market_Bid_Label", Market_Bid, Ask_Bid_Font_Size, Ask_Bid_Font_Type, Bid_Color);
   ObjectSet("Market_Bid_Label", OBJPROP_CORNER, Spread_Corner);
   ObjectSet("Market_Bid_Label", OBJPROP_XDISTANCE, Bid_X_Distance);
   ObjectSet("Market_Bid_Label", OBJPROP_YDISTANCE, Bid_Y_Distance);}}
 
return(0);


Sergey Golubev
Moderator
94494
Sergey Golubev 2013.10.08 06:43  

There are some indicators in MT5 CodeBase which can show bid and ask price, for example :

As to your indicator so it should be coded/converted for MT5. If no one will do it for free so - ask here - Job

air-seller
28
air-seller 2013.10.08 10:08  
newdigital:

There are some indicators in MT5 CodeBase which can show bid and ask price, for example :

As to your indicator so it should be coded/converted for MT5. If no one will do it for free so - ask here - Job

many thanks
To add comments, please log in or register