Bid_View1.2
Download scriptThis tool is designed to provide traders with a real-time visual dashboard directly on their trading chart. Its primary purpose is to display the current market price and specific trend indicators in a clean, easy-to-read format in any of the four corners of the screen.
Core Functionality
Dynamic Price Monitoring The script constantly tracks the "Bid" price (the current selling price) of the asset you are trading. It doesn't just show a static number; it intelligently adjusts its visual style based on market movement:
- Color Shifts: If the price is moving upward, the text changes to a specific color (DodgerBlue). If the price drops, it shifts to a neutral Gray. This allows traders to perceive market direction at a glance without constantly scanning the digits.
- Price Tracking Arrows: The tool includes "up" and "down" arrows that change colors based on whether the current price is higher or lower than previous points in time, providing an immediate visual cue for momentum.
Daily Performance Overview Beyond just the current price, the script calculates the daily performance of the asset:
- It compares the current daily closing price against the day's opening price.
- It then displays a numerical value representing the total movement for the day.
- Like the price display, these indicators are color-coded (Green for positive gains and Red for losses) so you can instantly see if the day is trending favorably or unfavorably.
Smart Configuration Features
Automatic Precision Adjustment The script includes built-in intelligence to handle different types of assets automatically. It recognizes various currency pairs and metals (such as Gold, USDJPY, or EURUSD) and automatically adjusts the number of decimal places displayed. This ensures that whether you are trading a high-precision forex pair or a gold contract, the information is presented accurately without manual tweaking.
Customizable Display Options To ensure the tool fits perfectly into your personal workspace, it offers several customization options:
- Corner Placement: You can choose which corner of the chart (Upper Left, Upper Right, Lower Left, or Lower Right) the information appears in.
- Visual Styling: Users can adjust the font size and type to ensure the data is legible regardless of the screen resolution.
- Visibility Toggles: You can enable or disable the color-changing logic depending on your preference for how much visual feedback you want from the price feed.
//+------------------------------------------------------------------+
//| BID_VIEW.mq4 |
//| Copyright © 2008, "OTCFX" |
//| Version 1.1 |
//+------------------------------------------------------------------+
#property indicator_chart_window
extern bool Bid_Colors = True;
extern int FontSize=18;
extern string FontType=" Sans MS";
extern string note5 = "Display the price in what corner?";
extern string note6 = "Upper left=0; Upper right=1";
extern string note7 = "Lower left=2; Lower right=3";
extern int WhatCorner=0;
double Old_Price;
double Old_Price1;
double Old_Price2;
int nDigits;
color ColorPrice = White;
// int TimeFrame = 1440;
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
string S = Symbol();
if(S=="GBPJPY" ||S=="EURJPY" || S=="USDJPY" || S=="GOLD" )nDigits = 2;
if(S=="GBPUSD" || S=="EURUSD" ||S=="NZDUSD" || S=="USDCHF" ||
S=="USDCAD" ||S=="AUDUSD" || S=="EURUSD" ||S=="EURCHF" || S=="EURGBP"
|| S=="EURCAD" ||S=="EURAUD" || S=="AUDNZD")nDigits = 4;
return(0);
}
int deinit()
{
ObjectDelete("M_P");
ObjectDelete("MPI");
ObjectDelete("MPI1");
ObjectDelete("MPI2");
ObjectDelete("MPI3");
ObjectDelete("TKR");
ObjectDelete("TKR1");
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
int R77=0,CD=0;
int i=0;
if (Bid_Colors == True)
{
if (Bid > Old_Price) ColorPrice = DodgerBlue;
if (Bid < Old_Price) ColorPrice = LightGray;
Old_Price = Bid;
}
color ColorCT709;
if( Bid < Old_Price2 ) { ColorCT709 =Red; }
Old_Price2 = Bid;
color ColorCT708;
if( Bid > Old_Price1 ) { ColorCT708 =Lime; }
Old_Price1 = Bid;
R77 = (iClose(NULL,PERIOD_D1,0)-iOpen(NULL,PERIOD_D1,0))/Point;
string Market_Price = DoubleToStr(Bid, Digits);
color ColorCH704 ;
if( R77 >= 0 ) { ColorCH704 =LimeGreen ; }
color ColorCH705 ;
if( R77 < 0 ) { ColorCH705 =Red ; }
ObjectCreate("TKR", OBJ_LABEL, 0, 0, 0);
ObjectSetText("TKR",StringSubstr(Symbol(),0),12, "Arial Bold", CadetBlue);
ObjectSet("TKR", OBJPROP_CORNER, WhatCorner);
ObjectSet("TKR", OBJPROP_XDISTANCE, 37);
ObjectSet("TKR", OBJPROP_YDISTANCE, 14);
ObjectCreate("M_P", OBJ_LABEL, 0, 0, 0);
ObjectSetText("M_P", Market_Price , FontSize, FontType, ColorPrice);
ObjectSet("M_P", OBJPROP_CORNER, WhatCorner);
ObjectSet("M_P", OBJPROP_XDISTANCE, 36);
ObjectSet("M_P", OBJPROP_YDISTANCE, 30);
if (Bid_Colors == True)
{
ObjectCreate("MPI",OBJ_LABEL,0,0,0);
ObjectSetText("MPI","^", 21, "Arial Bold", ColorCT708);
ObjectSet("MPI",OBJPROP_CORNER,WhatCorner);
ObjectSet("MPI",OBJPROP_ANGLE,360);
ObjectSet("MPI", OBJPROP_XDISTANCE, 18);
ObjectSet("MPI", OBJPROP_YDISTANCE, 14);}
if (Bid_Colors == True)
{
ObjectCreate("MPI1",OBJ_LABEL,0,0,0);
ObjectSetText("MPI1","^", 21, "Arial Bold", ColorCT709);
ObjectSet("MPI1",OBJPROP_CORNER,WhatCorner);
ObjectSet("MPI1",OBJPROP_ANGLE,182);
ObjectSet("MPI1", OBJPROP_XDISTANCE, 34);
ObjectSet("MPI1", OBJPROP_YDISTANCE, 50);}
ObjectCreate("MPI2",OBJ_LABEL,0,0,0);
ObjectSetText("MPI2","^", 13, "Arial Bold", ColorCH704);
ObjectSet("MPI2",OBJPROP_CORNER,WhatCorner);
ObjectSet("MPI2",OBJPROP_ANGLE,360);
ObjectSet("MPI2", OBJPROP_XDISTANCE, 120);
ObjectSet("MPI2", OBJPROP_YDISTANCE, 14);
ObjectCreate("MPI3",OBJ_LABEL,0,0,0);
ObjectSetText("MPI3","^", 13, "Arial Bold", ColorCH705);
ObjectSet("MPI3",OBJPROP_CORNER,WhatCorner);
ObjectSet("MPI3",OBJPROP_ANGLE,182);
ObjectSet("MPI3", OBJPROP_XDISTANCE, 130);
ObjectSet("MPI3", OBJPROP_YDISTANCE, 40);
ObjectCreate("TKR1", OBJ_LABEL, 0, 0, 0);
ObjectSetText("TKR1",DoubleToStr(R77,0),9, "Verdana Bold", Orange);
ObjectSet("TKR1", OBJPROP_CORNER, WhatCorner);
ObjectSet("TKR1", OBJPROP_XDISTANCE, 135);
ObjectSet("TKR1", OBJPROP_YDISTANCE, 14);
return(0);
}
Comments