VininI_Cyber Cycle(V2)

Download script
Author: Copyright � 2008, Victor Nicolaev
VininI_Cyber Cycle(V2)

The VininI_Cyber tool is a specialized technical analysis indicator designed to help traders identify underlying market trends and potential momentum shifts by filtering out "market noise." Instead of looking at raw price movements, which can often be erratic and confusing, this script applies a multi-layered mathematical transformation to provide a smoother, more digestible view of the market's direction.

How it Works

The logic follows a three-step process to translate complex price action into clear visual signals:

1. Price Smoothing (Smonth) First, the indicator takes the raw market data—such as the closing price or high/low averages—and applies a weighted moving average. By giving different levels of importance to the most recent prices compared to slightly older ones, it creates a "smoothed" foundation. This helps the tool ignore minor, insignificant price fluctuations while staying responsive to actual trend changes.

2. Cyclic Trend Analysis (Cycle) The smoothed data is then fed into a complex recursive formula. This part of the logic acts as a momentum tracker. It calculates the relationship between current values and previous values to determine the "cycle" of the market. Essentially, it measures how much the price is accelerating or decelerating in its current direction.

3. Signal Normalization (iCycle & Buy/Sell) To make the data easy for a human trader to read, the indicator performs a final conversion into a standardized scale (ranging from -1 to 1). This creates the primary visual output:

  • Positive Values: Indicate upward momentum.
  • Negative Values: Indicate downward momentum.

Visual Interpretation

The script automatically categorizes these results into clear "Buy" and "Sell" zones based on specific thresholds:

  • When the trend strength exceeds a positive threshold, the Buy signal is activated.
  • When the trend strength drops below a negative threshold, the Sell signal is activated.

By using this methodology, the indicator aims to provide traders with a clearer perspective on whether the current market cycle is favoring an upward or downward move, effectively separating the "signal" from the "noise" of the daily charts.

Miscellaneous
Implements a curve of type %1
14 Views
0 Downloads
0 Favorites
VininI_Cyber Cycle(V2)
//+------------------------------------------------------------------+
//|                                                     VininI_Cyber |
//|                                Copyright © 2009, Victor Nicolaev |
//|                                            e-mail: vinin@mail.ru |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2008, Victor Nicolaev"
#property link      "e-mail: vinin@mail.ru"

#property indicator_separate_window
#property indicator_buffers 3
#property indicator_color1 Yellow
#property indicator_color2 Green
#property indicator_color3 Red
#property indicator_level1  -0.5
#property indicator_level2   0
#property indicator_level3   0.5
#property indicator_minimum -1.05
#property indicator_maximum  1.05

//---- input parameters 

extern double alpha=0.01;
extern double betta=1.0;
extern int price_mode=4;

//---- buffers 

double Cycle[];
double Smonth[];
double iCycle[];
double Buy[];
double Sell[];

//+------------------------------------------------------------------+ 
//| Custom indicator initialization function | 
//+------------------------------------------------------------------+ 
int init() { 
   IndicatorBuffers(5);
   SetIndexBuffer(0, iCycle); 
   SetIndexStyle(0,DRAW_LINE);
   SetIndexBuffer(1, Buy); 
   SetIndexStyle(1,DRAW_LINE);
   SetIndexBuffer(2, Sell); 
   SetIndexStyle(2,DRAW_LINE);

   SetIndexBuffer(3, Smonth);
   SetIndexBuffer(4, Cycle);  



   return(0); 
}  

int deinit() { return(0); } 


//+------------------------------------------------------------------+ 
//| Custom indicator iteration function | 
//+------------------------------------------------------------------+ 
int start() { 
   int counted_bars = IndicatorCounted(); 

   if (counted_bars < 0) return(-1); 
   if (counted_bars > 0) counted_bars--;
   
   int limit=Bars - counted_bars;
   for(int i = limit; i >= 0; i--)    {
      Smonth[i]=(Price(i)+2.0*Price(i+1)+2.0*Price(i+2)+Price(i+3))/6.0;
   }
   for(i = limit; i >= 0; i--)    {
      Cycle[i]=betta*((1.0-0.5*alpha)*(1.0-0.5*alpha)*(Smonth[i]-2.0*Smonth[i+1]+Smonth[i+2])+2.0*(1.0-alpha)*Cycle[i+1]-(1.0-alpha)*(1.0-alpha)*Cycle[i+2]);
      iCycle[i]=(MathExp(2.0*Cycle[i])-1.0)/(MathExp(2.0*Cycle[i])+1.0);
      if (iCycle[i]>= 0.5) {Buy[i]=iCycle[i];Buy[i+1]=iCycle[i+1];}
      if (iCycle[i]<=-0.5) {Sell[i]=iCycle[i];Sell[i+1]=iCycle[i+1];}
   }

   return(0); 
} 
//+------------------------------------------------------------------+

double Price(int pos){
   switch (price_mode){
      case PRICE_CLOSE: return(Close[pos]);
      case PRICE_OPEN: return(Open[pos]);
      case PRICE_HIGH: return(High[pos]);
      case PRICE_LOW: return(Low[pos]);
      case PRICE_MEDIAN: return((High[pos]+Low[pos])/2.0); 
      case PRICE_TYPICAL: return((High[pos]+Low[pos]+Close[pos])/3.0);
      case PRICE_WEIGHTED: return((High[pos]+Low[pos]+Close[pos]+Close[pos])/4.0);
   }
}

Comments