VininI_STO_FO

Download script
Author: Copyright � 2008, Victor Nicolaev
VininI_STO_FO

The VininI_Cyber indicator is a specialized technical analysis tool designed to translate complex market momentum into clear, visual signals. It operates by processing standard market oscillators and refining them through multiple layers of mathematical smoothing to help traders identify potential buying and selling opportunities.

Core Logic Overview

The script works by following a three-step logical progression:

1. Momentum Calculation The process begins by capturing the "Stochastic" momentum of the market. This identifies where the current price sits relative to its recent range, helping to determine if the market is overextended or gaining strength. The script then normalizes this data into a centered value, creating a baseline for further analysis.

2. Smoothing and Trend Filtering To prevent the "noise" of constant price fluctuations from creating false signals, the script applies a Moving Average to the momentum data. This step acts as a filter, ensuring that only significant, sustained movements in market energy are highlighted rather than minor, temporary spikes.

3. Signal Generation (The "Fish" Logic) The final layer of logic transforms the smoothed movement into a specific mathematical formula (hyperbolic tangent style). This converts the data into a clear value range:

  • Buying Signals: When the processed momentum exceeds a high positive threshold, the script identifies a strong bullish trend and highlights it as a "Buy" signal.
  • Selling Signals: When the processed momentum falls below a low negative threshold, the script identifies a strong bearish trend and highlights it as a "Sell" signal.

Visual Representation

Instead of just showing a raw price line, this indicator provides a separate window where you can see:

  • A primary smoothed line representing the current market sentiment.
  • Distinct visual cues for Buy and Sell conditions, which appear when the momentum reaches specific levels of strength.

By combining these three steps—momentum detection, trend smoothing, and threshold filtering—the script aims to provide a more stable view of market direction than many standard indicators can offer on their own.

Indicators Used
Stochastic oscillatorMoving average indicator
Miscellaneous
Implements a curve of type %1
14 Views
0 Downloads
0 Favorites
VininI_STO_FO
//+------------------------------------------------------------------+
//|                                                     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 Lime
#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 int StoKPeriod      =  5;
extern int StoDPeriod      =  3;
extern int StoSlowing      =  3;

extern int StoMAMethod     =  0;
extern int StoPriceField   =  0;
extern int StoLineMode     =  0;

extern int  FO_MA_Period =9;
extern int  FO_MA_Method =3;
//---- buffers 

double Value[];
double MA[];
double iFish[];
double Buy[];
double Sell[];


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

   SetIndexBuffer(3, Value);
   SetIndexBuffer(4, MA);  



   return(0); 
}  

int deinit() { return(0); } 


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

   if (counted_bars < 0) return(-1); 
   if (counted_bars > 0) counted_bars--;
   
   int limit=Bars - counted_bars;
   for(i = limit; i >= 0; i--)    Value[i]=0.1*(iStochastic(NULL,0,StoKPeriod,StoDPeriod,StoSlowing,StoMAMethod,StoPriceField,StoLineMode,i)-50.0);
   for(i = limit; i >= 0; i--)    MA[i]=iMAOnArray(Value,0,FO_MA_Period,0,FO_MA_Method,i);
   for(i = limit; i >= 0; i--)    {

      iFish[i]=(MathExp(2.0*MA[i])-1.0)/(MathExp(2.0*MA[i])+1.0);
      if (iFish[i]> 0.5) {Buy[i] =iFish[i]; Buy[i+1] =iFish[i+1];}
      if (iFish[i]<-0.5) {Sell[i]=iFish[i]; Sell[i+1]=iFish[i+1];}
   }
   return(0); 
} 
//+------------------------------------------------------------------+


Comments