ang_Zad (C)_v2

Download script
ang_Zad (C)_v2

This tool is designed to provide traders with a visual representation of market momentum and price movement directly on their trading charts. It works by calculating two distinct dynamic lines that react to the current price action, helping to identify trends and potential shifts in the market's direction.

How it Works

The core logic relies on a sensitivity factor (the "ki" value) which determines how quickly or smoothly the indicator reacts to new price data. Rather than simply following the price exactly, the script calculates a weighted progression based on the difference between the current closing price and the previous values.

The Two Tracking Lines

The script generates two separate lines on your chart:

  • Trend Alignment (Blue Line): This line tracks the "flow" of the market. It follows upward movements when the price is rising and adjusts to downward movements when the price is falling. It essentially seeks to map out the prevailing momentum of the current trend.
  • Opposition/Context Tracking (Red Line): This line operates with a contrasting logic compared to the first. It looks for specific directional shifts—identifying instances where the price movement might be diverging or showing signs of exhaustion relative to the primary trend.

Practical Behavior

As new candles form on the chart, the script constantly compares the current closing price against its previous values and the previously calculated positions of both lines.

  1. Growth Phase: When the price moves in a consistent direction (up or down) while staying above or below the tracking points, the lines adjust proportionally to "catch" that movement.
  2. Dynamic Adjustment: The sensitivity constant ensures that the lines don't jump erratically; they move in a controlled manner that reflects the average strength of the price movement.
  3. Initialization: At the very beginning of the chart data, the tool synchronizes both lines to the current price to ensure a seamless transition into real-time monitoring.

By viewing these two lines together, traders can observe how the market is behaving in real-time, using the relationship between the Blue and Red lines to gauge whether a trend is gaining strength, slowing down, or potentially reversing.

Miscellaneous
Implements a curve of type %1
10 Views
0 Downloads
0 Favorites
ang_Zad (C)_v2
#property  copyright "ANG3110@latchess.com"
//--------ang_Zad (C)-------------------
#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Blue
#property indicator_color2 Red
//----------------------
extern double ki=4;
//--------------------
double za[],z,za2[],z2;
//********************************************************
int init(){
SetIndexStyle(0,DRAW_LINE);
SetIndexBuffer(0,za);
SetIndexBuffer(1,za2);
return(0);}
//********************************************************
int start() {
int i,cbi;
int n,ai,bi,f,ai2,bi2,f2; 
cbi=Bars-IndicatorCounted()-1;
//------------------------------------------------------------------------------------------------------------------------------
for(i=cbi; i>=0; i--) { 
if (Close[i]>z && Close[i]>Close[i+1]) z=za[i+1]+(Close[i]-za[i+1])/ki;
if (Close[i]<z && Close[i]<Close[i+1]) z=za[i+1]+(Close[i]-za[i+1])/ki;
if (Close[i]>z2 && Close[i]<Close[i+1]) z2=za2[i+1]+(Close[i]-za2[i+1])/ki;
if (Close[i]<z2 && Close[i]>Close[i+1]) z2=za2[i+1]+(Close[i]-za2[i+1])/ki;
if (i>Bars-5) {z=Close[i]; z2=z;}
za[i]=z;  
za2[i]=z2;
}
//------------------------------------------------------
   return(0);}
//********************************************************

Comments