Solar_Wind_clean_X_v2

Download script
Solar_Wind_clean_X_v2

This tool is designed to provide visual clarity on market price movements by identifying and smoothing out price trends. It operates in a separate window below your main price chart, translating complex price action into a streamlined visual signal.

How the Logic Works

The script follows a multi-step process to interpret market data:

1. Price Range Identification The tool begins by looking at a specific number of previous candles (defined by the "period" setting) to establish the highest peak and the lowest valley. By comparing where the current price sits within this high-low range, it determines the relative strength of the immediate move.

2. Signal Normalization Once it calculates the price position, the logic applies a mathematical formula to "normalize" that data. This means it takes raw price fluctuations and converts them into a standardized value. During this stage, the tool ensures the data stays within a specific boundary to prevent extreme outliers from distorting the visual signal.

3. Mathematical Transformation The script then applies a specific transformation (similar to a Fisher Transform). This is intended to make the market's "momentum" easier to see by reacting more quickly to significant price changes while remaining stable during periods of low volatility.

4. Smoothing and Filtering To prevent the indicator from being too "noisy" or jumpy, the raw signal is passed through a smoothing filter (defined by the "smoozing" setting). This mimics an Exponential Moving Average, creating a fluid line rather than jagged spikes.

Visual Representation

The final output is displayed as a two-color histogram:

  • Lime (Green): Indicates positive momentum or upward pressure.
  • Red: Indicates negative momentum or downward pressure.

By separating these signals into distinct colors and smoothing out the "noise" of the market, the tool aims to help traders identify the prevailing direction of the price trend more clearly.

Indicators Used
Moving average indicator
Miscellaneous
Implements a curve of type %1
13 Views
0 Downloads
0 Favorites
Solar_Wind_clean_X_v2
//+------------------------------------------------------------------+
//| Solar wind clean XXX(based on Solar wind clean  (FisherTransform)|
//| revised by Mladen    Copyright © 2005, MetaQuotes Software Corp. |
//| ForexTSD mladen nittany  mod fxbs  ki http://www.metaquotes.net/ |
//+------------------------------------------------------------------+
#property  copyright "Copyright © 2005,  MetaQuotes Software Corp."
#property  link      "http://www.metaquotes.net/ www.ForexTSD.com"
//---- indicator settings
#property  indicator_separate_window
#property  indicator_buffers 2
//----
#property  indicator_color1  Lime
#property  indicator_color2  Red
//----
extern int period   =10;
extern int smoozing =2;
//----
double         ExtBuffer0[];
double         ExtBuffer1[];
double         ExtBuffer2[];
double         Value[];
double         ExtBuffer3[];
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
int init()
  {
   IndicatorBuffers(5);
   SetIndexBuffer(0,ExtBuffer1);
   SetIndexBuffer(1,ExtBuffer2);
   SetIndexBuffer(2,ExtBuffer0);
   SetIndexBuffer(3,Value);
   SetIndexBuffer(4,ExtBuffer3);
   SetIndexStyle(0,DRAW_HISTOGRAM);
   SetIndexStyle(1,DRAW_HISTOGRAM);
//---  mod to show currency pair and Period by nittany1 forex-tsd
   //     IndicatorShortName("SOLAR WIND Clean("+Symbol()+","+period+")");
   IndicatorShortName("SOLARWIND CleanX ("+period+")("+smoozing+")");
   IndicatorDigits(Digits+1);
//----
   return(0);
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
int start()
  {
   int   limit;
   int   counted_bars=IndicatorCounted();
//----   
   if(counted_bars>0) counted_bars--;
   limit=Bars-counted_bars;
//----
   for(int i=limit; i>=0; i--)
     {
      double MaxH =High[iHighest(NULL,0,MODE_HIGH,period,i)];
      double MinL =Low [iLowest( NULL,0,MODE_LOW, period,i)];
      double price=(High[i]+Low[i])/2;
      if (MaxH!=MinL)
         Value[i]=0.33*2*((price-MinL)/(MaxH-MinL)-0.5);
      else  Value[i]=0.00;
      Value[i]=MathMin(MathMax(Value[i],-0.999),0.999);
      ExtBuffer0[i]=0.5*MathLog((1+Value[i])/(1-Value[i]));
     }
   for( i=limit; i>=0; i--)
     {
      ExtBuffer3[i]=iMAOnArray(ExtBuffer0,0,smoozing,0,MODE_EMA,i);
      if(ExtBuffer3[i]<0)
        {
         ExtBuffer2[i]=ExtBuffer3[i];
         ExtBuffer1[i]=0.0;
        }
      else
        {
         ExtBuffer1[i]=ExtBuffer3[i];
         ExtBuffer2[i]=0.0;
        }
     }
   return(0);
  }
//+------------------------------------------------------------------+

Comments