Price_Monitor-v2

Download script
Author: Damian Burrowes
Price_Monitor-v2

This tool is designed to provide traders with a real-time visual tracking system for current market prices directly on their trading charts. Instead of requiring the user to constantly look at the price numbers in the data window, it automates the placement of visual markers to highlight where the market is moving at any given second.

How the Logic Works

The script functions by continuously scanning the "live" price of the market and updating two specific visual indicators on your screen. Here is the breakdown of its core logic:

1. Real-Time Positioning The script identifies the most current trade price (the Bid) and calculates exactly where it sits relative to the current candle. It ensures that the markers stay perfectly synced with the live price action, moving forward automatically as the market ticks up or down.

2. Dynamic Visual Markers The logic manages two distinct visual objects on the chart. For each of these markers, the script performs a constant "Check and Update" cycle:

  • Detection: It first checks if the markers already exist on your screen.
  • Creation: If they are missing, it creates them immediately at the current price point.
  • Movement: If they are already there, it constantly updates their coordinates so they "stick" to the live price.

3. Visual Differentiation By maintaining two separate markers with different styling attributes, the logic allows for a clear visual distinction between different types of price data or price points. This helps the trader differentiate between various market layers at a single glance without cluttering the screen with unnecessary information.

Summary of Behavior

Essentially, this script acts as an automated "pointer." It eliminates the need for manual tracking by anchoring two specific visual icons to the live market price, allowing you to see exactly where the current price is moving in real-time as it happens.

7 Views
0 Downloads
0 Favorites
Price_Monitor-v2
//+------------------------------------------------------------------+
//|                                             Price Monitor-v2.mq4 |
//|                                                  Damian Burrowes |
//|                                            www.enhance-media.com |
//+------------------------------------------------------------------+
#property copyright "Damian Burrowes"
#property link      "www.enhance-media.com"

#property indicator_chart_window
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
//---- indicators
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
//----
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {
   int    counted_bars=IndicatorCounted();
//----
   if(ObjectFind("pricemonitor")<0)ObjectCreate("pricemonitor",OBJ_ARROW,0,Time[0]+(Time[1]-Time[2]), Bid);
   else {ObjectSet("pricemonitor",1,Bid); ObjectSet("pricemonitor",0,Time[0]+(Time[1]-Time[2]));ObjectSet("pricemonitor",14,6);ObjectSet("pricemonitor",8,8);}
   if(ObjectFind("pricemonitora")<0)ObjectCreate("pricemonitora",OBJ_ARROW,0,Time[0]+(Time[1]-Time[2]), Bid);
   else {ObjectSet("pricemonitora",1,Bid); ObjectSet("pricemonitora",0,Time[0]+(Time[1]-Time[2]));ObjectSet("pricemonitora",20,3);ObjectSet("pricemonitora",20,3);}
//----
   return(0);
  }
//+------------------------------------------------------------------+

Comments