PriceChange
Download scriptThis tool is designed to provide traders with a clear, visual representation of price action by isolating the difference between opening and closing prices on a per-candle basis. Instead of looking at the complex fluctuations of total market value, this indicator filters out the "noise" to show you exactly how much movement occurred during a specific period.
Core Functionality
The primary logic of the script calculates the raw distance traveled by the price from the moment a candle begins to the moment it finishes. By subtracting the opening price from the closing price, the tool creates a numerical value that represents whether the price moved up or down, and by how much.
Key Features & Adjustments
- Visual Representation: The data is displayed in a separate window beneath your main trading chart. This allows you to monitor price momentum independently of the primary price action.
- Dynamic Scaling: The script includes a built-in multiplier logic. Depending on your settings, it can adjust the scale of the movement to make it more readable based on the number of digits in your specific currency pair.
- Zero-Line Reference: It establishes a clear baseline (a dotted silver line) at the zero mark. This makes it easy to distinguish between "bullish" movement (values appearing above the line) and "bearish" movement (values appearing below the line).
How it Helps Your Trading
By using this script, you can quickly assess the strength of a price move without being distracted by the overall trend of the chart. It simplifies your view of market volatility, allowing you to see at a glance whether a candle resulted in a significant gain or loss relative to its starting point. It is an ideal tool for traders who want to analyze momentum and individual candle behavior with greater clarity.
//+------------------------------------------------------------------+
//| PriceChange.mq4 |
//| Shon Shampain |
//| http://www.zencowsgomu.com |
//| |
//| Visit http://www.zencowsgomu.com, an oasis of sanity |
//| for currency traders. |
//| |
//| Original out-of-the-box thinking, ideas, indicators, |
//| educational EAs and more. |
//| |
//| Home of the consistent T4 Forex trading signal. |
//| Backtesting profitably since 1-1-2002. |
//+------------------------------------------------------------------+
#property copyright "Shon Shampain"
#property link "http://www.zencowsgomu.com"
#property indicator_separate_window
#property indicator_buffers 1
#property indicator_color1 Aqua
double Change [];
extern bool tenths = true;
double mult;
int init()
{
int d = Digits;
if (tenths) d -= 1;
mult = 1.0;
for (int x = 0; x < d; x++)
mult *= 10.0;
SetIndexBuffer(0, Change);
SetLevelValue(0, 0.0);
SetLevelStyle(STYLE_DOT, 1, Silver);
return(0);
}
int deinit()
{
return(0);
}
int start()
{
int counted_bars;
int i;
counted_bars = IndicatorCounted();
i = Bars - counted_bars - 1;
while(i>=0)
{
Change[i] = (Close[i] - Open[i]) * mult;
i--;
}
return(0);
}
Comments