Vostro_+_2010
Download scriptThis technical indicator is designed to provide traders with visual signals for potential buying and selling opportunities by analyzing price volatility and overall market trends. It functions as a momentum and "overextended" price tracker, helping users identify when the market has moved significantly away from its average price point.
Core Logic Overview
The tool works by calculating a rolling average of both the market's price center (the midpoint between the high and low prices) and its relative volatility (the range between the high and low). By comparing current price action against these averages, the script determines how "stretched" the market is at any given moment.
Key Functional Components
- Dynamic Sensitivity: The indicator features a toggle between two distinct timeframes: a "Scalping" mode for faster-paced, short-term movements and a standard mode for longer-term trend analysis. This allows users to adjust the sensitivity of the signals based on their specific trading style.
- Volatility Normalization: Instead of looking at price in isolation, the script measures how far the current price is from the median relative to recent historical volatility. This helps normalize the data, ensuring that a price move in a highly volatile market isn't treated the same as a move in a quiet one.
- Trend Filtering: To reduce "false positives," the logic incorporates a weighted moving average. It cross-references the price strength with the broader trend; for example, it looks for significant upward momentum only if the price is also trading above a specific long-term average.
Signal Generation
The indicator outputs signals based on three main criteria:
- Extreme Deviation: It identifies moments where the price moves sharply beyond a defined threshold (the "overextended" zone).
- Directional Confirmation: It ensures that these deviations align with the prevailing market trend.
- Persistence Filtering: The logic includes a "cooldown" or "reset" mechanism. If a price remains in an extreme state for too many consecutive bars, the indicator will nullify the signal. This prevents the tool from giving continuous signals during a sustained breakout, focusing instead on the initial impact of a move.
Visual Representation
The final result is displayed in a separate window, where the indicator oscillates between specific numerical levels. When the price conditions meet the criteria for a potential buy or sell, the indicator highlights those extremes (approaching -90 or 90), while remaining neutral (at 0) during periods of standard market behavior.
/*
Generated by EX4-TO-MQ4 decompiler V4.0.224.1 []
Website: http://purebeam.biz
E-mail : purebeam@gmail.com
*/
#property copyright "Copyright © 2010, GoldenTraders Software Corp."
#property link "http://www.Golden-Traders.com"
#property indicator_separate_window
#property indicator_minimum -100.0
#property indicator_maximum 100.0
#property indicator_levelcolor Red
#property indicator_width1 2
#property indicator_level1 80.0
#property indicator_level2 -80.0
extern string ModeTravail = "Acheter à -100% et Vendre à 100%";
extern string TradeMode = "Choisir votre Mode de Trading : ";
extern bool Scalping = TRUE;
extern string IndColor = "Choisir La Couleur Indicateur : ";
extern color Couleur = Blue;
double g_ibuf_108[];
double g_ibuf_112[];
double g_ibuf_116[];
double gd_120;
double gd_128;
double gd_136;
int gi_144 = 5;
int gi_148;
int gi_152;
int g_period_156;
int init() {
IndicatorBuffers(3);
SetIndexStyle(0, DRAW_LINE, EMPTY, 2, Couleur);
SetIndexBuffer(0, g_ibuf_108);
SetIndexBuffer(1, g_ibuf_116);
SetIndexBuffer(2, g_ibuf_112);
IndicatorShortName("Vostro © 2010 ");
return (0);
}
int deinit() {
return (0);
}
int start() {
if (Year() >= 2012) return (0);
if (Scalping == TRUE) g_period_156 = 100;
else g_period_156 = 300;
for (gi_152 = 0; gi_152 < Bars; gi_152++) {
gd_120 = 0;
for (gi_148 = gi_152; gi_148 < gi_144 + gi_152; gi_148++) gd_120 += (High[gi_148] + Low[gi_148]) / 2.0;
gd_128 = gd_120 / gi_144;
gd_120 = 0;
for (gi_148 = gi_152; gi_148 < gi_144 + gi_152; gi_148++) gd_120 += High[gi_148] - Low[gi_148];
gd_136 = 0.2 * (gd_120 / gi_144);
g_ibuf_116[gi_152] = (Low[gi_152] - gd_128) / gd_136;
g_ibuf_112[gi_152] = (High[gi_152] - gd_128) / gd_136;
if (g_ibuf_112[gi_152] > 8.0 && High[gi_152] > iMA(NULL, 0, g_period_156, 0, MODE_LWMA, PRICE_MEDIAN, gi_152)) g_ibuf_108[gi_152] = 90.0;
else {
if (g_ibuf_116[gi_152] < -8.0 && Low[gi_152] < iMA(NULL, 0, g_period_156, 0, MODE_LWMA, PRICE_MEDIAN, gi_152)) g_ibuf_108[gi_152] = -90.0;
else g_ibuf_108[gi_152] = 0.0;
}
if (g_ibuf_112[gi_152] > 8.0 && g_ibuf_112[gi_152 - 1] > 8.0) g_ibuf_108[gi_152] = 0;
if (g_ibuf_112[gi_152] > 8.0 && g_ibuf_112[gi_152 - 1] > 8.0 && g_ibuf_112[gi_152 - 2] > 8.0) g_ibuf_108[gi_152] = 0;
if (g_ibuf_116[gi_152] < -8.0 && g_ibuf_116[gi_152 - 1] < -8.0) g_ibuf_108[gi_152] = 0;
if (g_ibuf_116[gi_152] < -8.0 && g_ibuf_116[gi_152 - 1] < -8.0 && g_ibuf_116[gi_152 - 2] < -8.0) g_ibuf_108[gi_152] = 0;
}
return (0);
}
Comments