Solar_Wind_clean_Xalert_001
Download scriptThe Solar Wind Clean XXX is a specialized technical analysis tool designed to identify momentum and directional shifts in the financial markets. Rather than simply tracking price, it focuses on normalizing market volatility to provide a clearer picture of where the "energy" of the trade is moving.
Core Methodology
The logic operates through a multi-stage mathematical process:
1. Price Range Analysis The tool begins by looking at a specific window of recent time (the "period"). It identifies the highest high and the lowest low reached during that timeframe. By comparing the current price to these extremes, it determines where the price sits within its recent range. This allows the tool to see if the price is currently pushing against the ceiling, sitting on the floor, or hovering in the middle.
2. Data Transformation (Fisher Transform) One of the primary characteristics of this script is its use of a "transformation" logic. Standard market data can be erratic and prone to extreme outliers. The tool applies a mathematical formula that compresses these extremes into a more manageable scale. This effectively "smooths out" the noise, making it easier for a trader to see the underlying trend without being distracted by minor price spikes or erratic fluctuations.
3. Trend Smoothing After the data is transformed, the script applies an Exponential Moving Average (EMA). This acts as a secondary filter, further refining the signal to ensure that the movements shown on the chart represent sustained momentum rather than momentary "flickers" in price action.
Visual Output and Signals
The final result is displayed in a separate window below your main price chart:
- Directional Histogram: The indicator uses color-coded bars (typically Lime for upward momentum and Red for downward momentum) to represent the strength of the trend.
- The Zero Line: This serves as the equilibrium point. When the signal moves above the zero line, it suggests a positive momentum shift; when it drops below, it suggests a negative shift.
- Automated Alerts: The logic includes a "crossing" detection system. It monitors for specific moments where the momentum shifts from one side of the zero line to the other. When these significant reversals occur, the script is capable of triggering an instant notification (Alert) to the user, highlighting potential entry or exit points in real-time.
Summary for Traders
Essentially, this tool takes raw market data, strips away the "noise" of daily volatility through mathematical transformation, and presents you with a clean, smoothed visualization of momentum. It helps you distinguish between a temporary price fluctuation and a genuine shift in market direction.
//+------------------------------------------------------------------+
//| 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 copyright ""
#property link ""
#property indicator_separate_window
#property indicator_buffers 2
#property indicator_color1 Lime
#property indicator_color2 Red
extern bool AlertON=true;
extern int period = 10;
extern int smoozing = 2;
double ExtBuffer0[];
double ExtBuffer1[];
double ExtBuffer2[];
double Value[];
double ExtBuffer3[];
int flagval1 = 0;
int flagval2 = 0;
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;
}
if ((ExtBuffer1[i] > 0) && (ExtBuffer2[i+1] > 0.0))
{
if (i == 1 && flagval1==0)
{
flagval1=1;
flagval2=0;
if (AlertON) Alert("Crossing zero line up\n Time=",TimeToStr(TimeCurrent(),TIME_DATE)," ",TimeHour(TimeCurrent()),":",TimeMinute(TimeCurrent()),"\n Symbol=",Symbol()," Period=",Period());
}
}
else if ((ExtBuffer2[i] > 0) && (ExtBuffer1[i+1] > 0.0))
{
if (i == 1 && flagval2==0)
{
flagval2=1;
flagval1=0;
if (AlertON) Alert("Crossing zero line up\n Time=",TimeToStr(TimeCurrent(),TIME_DATE)," ",TimeHour(TimeCurrent()),":",TimeMinute(TimeCurrent()),"\n Symbol=",Symbol()," Period=",Period());
}
}
}
return(0);
}
Comments