Fozzy_Alert

Download script
Author: Fozzy
Fozzy_Alert

The Fozzy Daily Indicator is a specialized technical analysis tool designed to provide visual cues and automated alerts by layering three different types of market momentum and volatility filters. Instead of looking at raw price action alone, this script processes the data through multiple stages to smooth out "noise" and identify significant trend shifts.

How the Logic Works

The indicator operates using a three-step calculation process:

1. Momentum Measurement (RSI) The foundation of the script is the Relative Strength Index (RSI). This measures the speed and change of price movements to determine if an asset is overbought or oversold. By using this as the starting point, the tool begins by evaluating the "strength" of the current trend rather than just the price.

2. Trend Smoothing (RSI-MA) To prevent the data from being too erratic, the script takes the RSI values and applies a Moving Average to them. This creates a smoother line that represents the average momentum over a specific period. This secondary layer helps traders distinguish between minor price fluctuations and actual sustained shifts in direction.

3. Volatility Channeling (Bollinger Bands) In the final stage, the script applies Bollinger Bands—a volatility indicator—directly onto the smoothed Moving Average. This creates a "channel" of expected movement. It establishes an upper limit, a lower limit, and a midline based on the standard deviations of the momentum data.

Signals and Alerts

The core logic of the tool focuses on the relationship between the primary RSI line and its Moving Average (RSIMA):

  • Crossings: The script monitors the point where the RSI line crosses above or below its Moving Average. These "crosses" are often interpreted as signals that momentum is shifting from bearish to bullish, or vice versa.
  • Automated Alerts: The tool includes a built-in notification system. When the script detects a definitive crossover (where the relationship between the RSI and the Moving Average flips), it triggers an alert on your chart. It is programmed to recognize only the initial change in direction, ensuring that you are notified once per trend shift rather than being bombarded with constant notifications.

Summary for the User

Essentially, this indicator filters out the "chaos" of the market by looking at the momentum of the price, smoothing that momentum into a steady trend line, and then watching for specific moments where the current strength breaks away from that average. It provides a visual representation of these dynamics in a separate window, allowing you to see where the market is gaining or losing steam in real-time.

Indicators Used
Relative strength indexMoving average indicator
Miscellaneous
Implements a curve of type %1It issuies visual alerts to the screen
11 Views
0 Downloads
0 Favorites
Fozzy_Alert
//+------------------------------------------------------------------+
//|                Fozzy Daily Indicator                           |
//|                Programmed by Aidrian O'Connor                  |
//|                http://www.unitone.org            |
//+------------------------------------------------------------------+
#property copyright "Fozzy"
#property link      "http://"

#property indicator_separate_window
#property indicator_buffers 5
#property indicator_color1 Aqua
#property indicator_color2 Red
#property indicator_color3 MediumSeaGreen
#property indicator_color4 MediumSeaGreen
#property indicator_color5 MediumSeaGreen

//---- indicator parameters
extern int    RSIPeriod = 9;
extern int    RSIMAPeriod = 8;
extern int    BandsPeriod=40;
extern int    BandsShift=0;
extern double BandsDeviations=2.0;

//---- buffers
double RSI[];
double RSIMA[];
double BBMid[];
double BBUp[];
double BBDn[];
int i;
  
int init()
  {

  IndicatorBuffers(5);
 
//---- drawing settings
   SetIndexStyle(0,DRAW_LINE);
   SetIndexDrawBegin(0,i-1);
   SetIndexBuffer(0, RSI);
   SetIndexLabel(0,"RSI");

   SetIndexStyle(1,DRAW_LINE);
   SetIndexDrawBegin(1,i-1);
   SetIndexBuffer(1, RSIMA);
   SetIndexLabel(1,"RSI-MA");
   
   SetIndexStyle(2,DRAW_LINE,STYLE_DOT,0,MediumSeaGreen);
   SetIndexDrawBegin(2,i-1);
   SetIndexBuffer(2, BBMid);
   SetIndexLabel(2,"BB-Mid");
   
   SetIndexStyle(3,DRAW_LINE,STYLE_DOT,0,MediumSeaGreen);
   SetIndexDrawBegin(3,i-1);
   SetIndexBuffer(3, BBUp);
   SetIndexLabel(3,"BB-Up");
   
   SetIndexStyle(4,DRAW_LINE,STYLE_DOT,0,MediumSeaGreen);
   SetIndexDrawBegin(4,i-1);
   SetIndexBuffer(4, BBDn);
   SetIndexLabel(4,"BB-Dn");
 
   return(0);
  }

//--------------- Alert Code ---------------\\

bool Crossed (double line1 , double line2 )
{

static string last_direction = "";
string current_direction = "";

if(line1>line2)current_direction = "up";
if(line1<=line2)current_direction = "down";

if(current_direction != last_direction) 
{
      Alert("Fozzy Cross for "+Symbol()+" on the "+Period()+" minute chart.");
      last_direction = current_direction;
      return (true);
}
else
{
      return (false);

}
 
} 
//------------------------------------------\\


int start()
  {
   i=Bars-BandsPeriod;
   while(i>=0) {
     RSI[i] = iRSI(NULL,0,RSIPeriod,PRICE_CLOSE,i);
   i--;
   }
   
   i=Bars-BandsPeriod;
   while(i>=0) {
     RSIMA[i] = iMAOnArray(RSI,0,RSIMAPeriod,0,MODE_SMA,i);
   i--;
   }
   
   i=Bars-BandsPeriod;
   while(i>=0) {
     BBMid[i] = iMAOnArray(RSIMA,0,BandsPeriod,BandsShift,MODE_SMA,i);
     BBUp[i] = iBandsOnArray(RSIMA,0,BandsPeriod,BandsDeviations,BandsShift,MODE_UPPER,i);
     BBDn[i] = iBandsOnArray(RSIMA,0,BandsPeriod,BandsDeviations,BandsShift,MODE_LOWER,i);
   i--;
   }
   
     Print(Crossed (RSI[0],RSIMA[0]));  
  
   return(0);
  }
 
//+------------------------------------------------------------------+

Comments