MTF_#MAMA_2.1

Download script
Author: Kalenzo
MTF_#MAMA_2.1

This technical indicator is designed to provide traders with visual signals and automated notifications based on momentum shifts. It functions by analyzing price data across different timeframes to identify potential trend reversals or continuations, specifically focusing on the relationship between two distinct moving average lines.

Core Functionality

The tool operates by pulling data from a specialized calculation method known as "MAMA." Instead of looking at the current chart in isolation, the script scans a secondary, user-defined timeframe (such as 15 minutes) to determine the overall market direction. It then projects two separate data points—a "Fast" and a "Slow" value—onto your primary trading screen.

Visual Representation

On your chart, the indicator displays these values as two distinct types of dots (histograms). These dots represent the current status of the momentum:

  • Trend Alignment: When the lines move in harmony, they indicate the prevailing strength of the market.
  • Crossover Detection: The primary purpose of this tool is to identify the exact moment these two values cross over one another.

Signal Logic

The script is programmed to trigger specific actions based on "crossover" events:

  • Short Signal: If the fast value was previously above the slow value but then drops below it, the system identifies a potential downward momentum shift.
  • Long Signal: If the fast value was previously below the slow value but then rises above it, the system identifies a potential upward momentum shift.

Automated Alerts and Notifications

To ensure traders do not miss these critical transitions, the script includes an automated communication system. When a crossover occurs, the tool performs two actions:

  1. Desktop Alert: A pop-up notification appears immediately on your trading platform.
  2. Email Notification: An automated email is sent to your registered account, providing you with a summary of the signal, including the specific currency pair and timeframe involved.

By combining multi-timeframe analysis with real-time alerts, this tool serves as a monitoring system that helps filter out market noise and highlights significant momentum changes for more informed decision-making.

Miscellaneous
Implements a curve of type %1It issuies visual alerts to the screenIt sends emails
11 Views
0 Downloads
0 Favorites
MTF_#MAMA_2.1
#property copyright "Kalenzo"
#property link      "http://www.fxservice.eu"
#property indicator_buffers 2

#property indicator_color1 Lime 
#property indicator_color2 MediumOrchid

#property indicator_width1 1
#property indicator_width2 1
 
extern int    TimeFrame= 15;
extern double FastLimit=0.5;
extern double SlowLimit=0.05; 
 
extern bool       AlertOn     = true;
extern bool       MailOn      = true;

double sUp1[],sDn1[];
int a=0,b=0;
#property indicator_chart_window
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
//---- indicators
   SetIndexBuffer(0,sUp1);
   SetIndexBuffer(1,sDn1);
   
   SetIndexStyle(0,DRAW_HISTOGRAM,STYLE_DOT);
   SetIndexStyle(1,DRAW_HISTOGRAM,STYLE_DOT);
    
   
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
//----
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  { 
     
     int counted_bars=IndicatorCounted();
     if(counted_bars<0) return(-1);
     if(counted_bars>0) counted_bars--;
     int limit=Bars-counted_bars;
     
     for(int i=0; i<=limit; i++)
     {
         sUp1[i] = 0; sDn1[i] = 0;
         
         int bbs = iBarShift(NULL,TimeFrame,Time[i],true);
         
         sUp1[i] = iCustom(NULL,TimeFrame,"#MAMA",FastLimit,SlowLimit,0,bbs);
         sDn1[i] = iCustom(NULL,TimeFrame,"#MAMA",FastLimit,SlowLimit,1,bbs);
         
         
     }
     
         if(Bars > a  && sUp1[2]>=sDn1[2] && sUp1[1]<sDn1[1])
         {
            Alert(Symbol()+" M("+Period()+") SHORT -> MAMA");
            SendMail("SHORT MAMA",Symbol()+" M("+Period()+") SHORT -> MAMA");
            a = Bars;
         }
         
         if(Bars>b  && sUp1[2]<=sDn1[2] && sUp1[1]>sDn1[1])
         {
            Alert(Symbol()+" M("+Period()+") LONG ->  MAMA");
            SendMail("LONG MAMA",Symbol()+" M("+Period()+") LONG ->  MAMA");
            b = Bars;
         }

     return(0);
  }
//+------------------------------------------------------------------+

Comments