solarwindfastalert

Download script
solarwindfastalert

This script is designed as a visual trading tool for MetaTrader that identifies specific momentum shifts by monitoring the relationship between two different data streams. It functions as an automated alert system that marks potential entry or exit points directly on your price chart using visual markers.

How the Logic Works

The tool operates by constantly scanning the market's recent history to compare current data against the previous candle's information. It specifically looks for "breakout" moments where a value moves from a neutral state into an active state.

1. The Source Data The script relies on an external technical indicator (referred to as "solar wind mod1"). It monitors two distinct components from this indicator: one representing positive momentum and the other representing negative momentum.

2. Identification of Signals The logic evaluates every candle to see if a transition has occurred:

  • Positive Momentum Signal: The script looks for instances where the positive momentum value was at zero (neutral) in the previous candle but has moved above zero in the current candle. When this happens, the script places a cyan-colored marker just below the lowest price of that candle. This suggests a shift toward upward strength.
  • Negative Momentum Signal: Conversely, the script looks for instances where the negative momentum value was at zero in the previous candle but has dropped below zero in the current candle. When this occurs, the script places a magenta-colored marker just above the highest price of that candle. This suggests a shift toward downward strength.

Summary for the User

Instead of cluttering your screen with complex numbers, this tool simplifies market analysis by filtering out the "noise." It only triggers a visual signal when the underlying momentum shifts from a state of inactivity (zero) into a clear positive or negative direction. This allows you to quickly identify potential trend reversals or strength shifts at a glance.

Miscellaneous
Implements a curve of type %1
12 Views
0 Downloads
0 Favorites
solarwindfastalert
#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Cyan
#property indicator_color2 Magenta
//---- input parameters
extern int a=14;
//---- buffers
double ExtMapBuffer1[];
double ExtMapBuffer2[];

double b4plusdi,b4minusdi,nowplusdi,nowminusdi;

//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicators
SetIndexStyle(0,DRAW_ARROW,EMPTY,2);
SetIndexArrow(0,108);
SetIndexBuffer(0, ExtMapBuffer1);

SetIndexStyle(1,DRAW_ARROW,EMPTY,2);
SetIndexArrow(1,108);
SetIndexBuffer(1, ExtMapBuffer2);
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custor indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//---- TODO: add your code here

//ObjectDelete(1, DRAW_ARROW,0,0,0);
//ObjectDelete(2, DRAW_ARROW,0,0,0);

//----

}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
int limit;
int counted_bars=IndicatorCounted();
//---- check for possible errors
if(counted_bars<0) return(-1);

//---- last counted bar will be recounted
if(counted_bars>0) counted_bars--;
limit=500;
//---- macd counted in the 1-st buffer

 for(int i=limit; i>=0; i--)
{
   b4plusdi=iCustom(NULL,0,"solar wind mod1",1,i+1);
   nowplusdi=iCustom(NULL,0,"solar wind mod1",1,i);
   
   b4minusdi=iCustom(NULL,0,"solar wind mod1",2,i+1);
   nowminusdi=iCustom(NULL,0,"solar wind mod1",2,i);
    //Comment(nowplusdi," ",nowminusdi);
 
 
 
 
 if(nowplusdi>0&& b4plusdi==0)
        {
            ExtMapBuffer1[i]=Low[i]-1*Point;
          // if( i<1 )PlaySound("stops.wav");
          }
 if(nowminusdi<0 && b4minusdi==0)
        {
            ExtMapBuffer2[i]=High[i]+1*Point;
           // if (i<1) PlaySound("stops.wav");
         }
}
//----
return(0);
}

Comments