Magnified Market Price_v1
Download scriptThis tool is designed to provide a clear, real-time visual display of the current market price directly on your trading chart. Instead of having to look at the small price quotes on the side of the screen, it projects the live "Bid" price as a large, easy-to-read text label in a specific corner of your workspace.
Core Functionality
The script functions as a dynamic dashboard element. Its primary job is to take the ever-changing market price and display it in a format that is customized to your personal viewing preferences. It allows you to define exactly how this information appears without cluttering your technical analysis.
Key Features & Logic:
- Customizable Visuals: You have full control over the aesthetics of the price display. You can choose the font type (such as Arial Bold), the size of the text, and the specific color of the numbers to ensure they stand out against your chart background.
- Flexible Positioning: The tool is designed to be non-intrusive. It allows you to select which corner of the screen the price should appear in (Upper Left, Upper Right, Lower Left, or Lower Right), keeping the information visible but out of the way of your main candles and indicators.
- Dynamic Color Switching: One of the advanced features is the ability to automate color changes based on market movement. If enabled, the text will intelligently change colors:
- It turns Green when the price is moving upward compared to the previous tick.
- It turns Red when the price is moving downward.
- This provides an immediate visual cue of the market's momentum at a single glance.
- Real-Time Updates: The script constantly monitors the "Bid" price. Every time the market moves, the label updates instantly, ensuring that the information you are seeing is always live and accurate.
Summary for the User
In short, this tool simplifies your trading environment by pulling the most important piece of data—the current price—and making it large, legible, and visually reactive. Whether you want a static black display or a dynamic green/red indicator, this script ensures you never have to squint at the price feed again.
//+------------------------------------------------------------------+
//| Magnified Market Price.mq4 ver1.4 by Habeeb |
//+------------------------------------------------------------------+
#property indicator_chart_window
extern string note1 = "Change font colors automatically? True = Yes";
extern bool Bid_Ask_Colors = False;
extern string note2 = "Default Font Color";
extern color FontColor = Black;
extern string note3 = "Font Size";
extern int FontSize=26;
extern string note4 = "Font Type";
extern string FontType="Arial Bold";
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=1;
double Old_Price;
int init()
{
return(0);
}
int deinit()
{
ObjectDelete("Market_Price_Label");
return(0);
}
int start()
{
if (Bid_Ask_Colors == True)
{
if (Bid > Old_Price) FontColor = LawnGreen;
if (Bid < Old_Price) FontColor = Red;
Old_Price = Bid;
}
string Market_Price = DoubleToStr(Bid, Digits);
ObjectCreate("Market_Price_Label", OBJ_LABEL, 0, 0, 0);
ObjectSetText("Market_Price_Label", Market_Price, FontSize, FontType, FontColor);
ObjectSet("Market_Price_Label", OBJPROP_CORNER, WhatCorner);
ObjectSet("Market_Price_Label", OBJPROP_XDISTANCE, 1);
ObjectSet("Market_Price_Label", OBJPROP_YDISTANCE, 1);
}
Comments