Magnified ATRPrice

Download script
Magnified ATRPrice

This tool is designed to provide traders with a clear, real-time visual of current market volatility by displaying a specific price metric directly on the trading chart. Instead of making you scan through complex lists of numbers or manual calculations, it automates the retrieval and presentation of this data in an easy-to-read format.

How the Logic Works

The core logic of this script revolves around three main steps:

1. Data Calculation The tool identifies a specific type of market movement known as the ATR (Average True Range). It looks back at a set number of previous price movements (which you can customize) to determine how much the market has been "swinging" recently. This calculation helps traders understand the current intensity of the market—whether it is moving calmly or experiencing high-velocity fluctuations.

2. Dynamic Display Creation Once the tool calculates this value, it automatically generates a text label on your chart. It converts the raw numerical data into a readable string (e.g., "ATR : [Value]") and applies your preferred visual settings. This includes choosing the font size, the color of the text, and the specific typeface to ensure the information stands out clearly against your background.

3. Positioning and Updates The script is programmed to anchor this information in a specific corner of your screen (such as the bottom right) at a set distance from the edge. Because it runs continuously, the label refreshes instantly. As the market moves, the number updates automatically, providing you with a live "dashboard" view of market volatility without cluttering your actual price candles or charts.

Summary for the User

In simple terms, this script acts like a digital speedometer for the market. It takes complex volatility data from the background, processes it instantly, and pins a large, easy-to-read display on your screen so you can monitor market conditions at a single glance.

Indicators Used
Indicator of the average true range
7 Views
0 Downloads
0 Favorites
Magnified ATRPrice
//+------------------------------------------------------------------+
//| Magnified Market Price.mq4        ver1.4             by Habeeb   |
//+------------------------------------------------------------------+

#property indicator_chart_window

  extern int   ATR_Period = 5;
  extern int   ATR_Y_Pos = 40;
  extern string note2 = "Default Font Color";
  extern color  FontColor = Aqua;
  extern string note3 = "Font Size";
  extern int    FontSize=32;
  extern string note4 = "Font Type";
  extern string FontType="Arial";
  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=3;


int init()
  {
   return(0);
  }

int deinit()
  {
  ObjectDelete("Market_ATR_Label"); 
  
  return(0);
  }

int start()
  {
   
   string ATR_Price = "ATR : " + DoubleToStr(iATR(NULL, 0, ATR_Period, 1), Digits);
  
   ObjectCreate("Market_ATR_Label", OBJ_LABEL, 0, 0, 0);
   ObjectSetText("Market_ATR_Label", ATR_Price, FontSize, FontType, FontColor);
   ObjectSet("Market_ATR_Label", OBJPROP_CORNER, WhatCorner);
   ObjectSet("Market_ATR_Label", OBJPROP_XDISTANCE, 1);
   ObjectSet("Market_ATR_Label", OBJPROP_YDISTANCE, ATR_Y_Pos);
  }

Comments