Elite indicators :) - page 1321

 
Dimi.A:

I just really like the way it's set out on the chart with the alert and the "Volatility" text which changes colour whenever the pip count is above the chosen level.

Use this code :

#property indicator_chart_window

extern int    DisplayXPos             = 150;
extern int    DisplayYPos             = 20;
extern string DisplayID               = "comment";
extern color  DisplayColorNormal      = clrGray;
extern color  DisplayColorAboveLevel  = clrLimeGreen;
extern int    DisplayFontSize         = 15;
extern double DisplayLevel            = 5;
extern bool   DisplayAutoCenter       = true;
extern bool   alertsOn                = false;
extern bool   alertsOnCurrent         = true;
extern bool   alertsMessage           = true;
extern bool   alertsSound             = false;
extern bool   alertsEmail             = false;


#include <ChartObjects\ChartObjectsTxtControls.mqh> 
CChartObjectLabel  label;

//
//
//
//
//

int init()   {                 return(0); }
int deinit() { label.Delete(); return(0); }
int start()
{
   double pips = iATR(NULL,0,1,0)/(_Point*MathPow(10,MathMod(_Digits,2)));
   int    xpos = DisplayXPos;
   
   if (label.Name()!= DisplayID)
       label.Create(0,DisplayID,0,xpos,DisplayYPos);
       label.Description("Volatility : "+(string)pips+" pips");
       label.FontSize(DisplayFontSize); 
       label.Font("Arial bold"); 
       if (DisplayLevel>pips)
               { label.Color(DisplayColorNormal); }
       else    { label.Color(DisplayColorAboveLevel); if (alertsOn) doAlert((string)DisplayLevel+" pips"); }
       if (DisplayAutoCenter)
       {
            xpos = (ChartGetInteger(0,CHART_WIDTH_IN_PIXELS)-label.X_Size())/2; label.X_Distance(xpos);
       }         
       
   return(0);
}

//--------------------------------------------------------------------------------------
//
//--------------------------------------------------------------------------------------
//
//
//
//
//

void doAlert(string doWhat)
{
   static string   previousAlert="nothing";
   static datetime previousTime;
   string message;
   
      if (previousAlert != doWhat || previousTime != Time[0]) {
          previousAlert  = doWhat;
          previousTime   = Time[0];

          //
          //
          //
          //
          //

          message = _Symbol+" at "+TimeToStr(TimeLocal(),TIME_SECONDS)+" volaitily exceeded "+doWhat;
             if (alertsMessage) Alert(message);
             if (alertsEmail)   SendMail(_Symbol+" volatility ",message);
             if (alertsSound)   PlaySound("alert2.wav");
      }
}

Save it as any name and then you shell get something like this (alerts included when "volatility" exceeds the desired level in pips) :


 
mladen:

Use this code :

Save it as any name and then you shell get something like this :


You're a saint. Thanks Mladen.
Where yours says "Volatility" how do I get that? Do I just in put "Volatility" in the comment section? :)

 
Dimi.A:

You're a saint. Thanks Mladen.
Where yours says "Volatility" how do I get that? Do I just in put "Volatility" in the comment section? :)

Use this code to change the text from the options too (DisplayText option) :

#property indicator_chart_window

extern int    DisplayXPos             = 150;
extern int    DisplayYPos             = 20;
extern string DisplayID               = "comment";
extern string DisplayText             = "Volatility";
extern color  DisplayColorNormal      = clrGray;
extern color  DisplayColorAboveLevel  = clrLimeGreen;
extern int    DisplayFontSize         = 15;
extern double DisplayLevel            = 5;
extern bool   DisplayAutoCenter       = true;
extern bool   alertsOn                = false;
extern bool   alertsMessage           = true;
extern bool   alertsSound             = false;
extern bool   alertsEmail             = false;


#include <ChartObjects\ChartObjectsTxtControls.mqh> 
CChartObjectLabel  label;

//
//
//
//
//

int init()   {                 return(0); }
int deinit() { label.Delete(); return(0); }
int start()
{
   double pips = iATR(NULL,0,1,0)/(_Point*MathPow(10,MathMod(_Digits,2)));
   int    xpos = DisplayXPos;
   
   if (label.Name()!= DisplayID)
       label.Create(0,DisplayID,0,xpos,DisplayYPos);
       label.Description(DisplayText+" "+(string)pips+" pips");
       label.FontSize(DisplayFontSize); 
       label.Font("Arial bold"); 
       if (DisplayLevel>pips)
               { label.Color(DisplayColorNormal); }
       else    { label.Color(DisplayColorAboveLevel); if (alertsOn) doAlert((string)DisplayLevel+" pips"); }
       if (DisplayAutoCenter)
       {
            xpos = (ChartGetInteger(0,CHART_WIDTH_IN_PIXELS)-label.X_Size())/2; label.X_Distance(xpos);
       }         
       
   return(0);
}

//--------------------------------------------------------------------------------------
//
//--------------------------------------------------------------------------------------
//
//
//
//
//

void doAlert(string doWhat)
{
   static string   previousAlert="nothing";
   static datetime previousTime;
   string message;
   
      if (previousAlert != doWhat || previousTime != Time[0]) {
          previousAlert  = doWhat;
          previousTime   = Time[0];

          //
          //
          //
          //
          //

          message = _Symbol+" at "+TimeToStr(TimeLocal(),TIME_SECONDS)+DisplayText+" exceeded "+doWhat;
             if (alertsMessage) Alert(message);
             if (alertsEmail)   SendMail(_Symbol+" volatility ",message);
             if (alertsSound)   PlaySound("alert2.wav");
      }
}
 
mladen:

Use this code to change the text from the options too (DisplayText option) :

Magic! Can I ask, do alerts come up once per candle or do they constantly alert in real time if the pip count is above the level?

Love your work.
 
Dimi.A:
Magic! Can I ask, do alerts come up once per candle or do they constantly alert in real time if the pip count is above the level?

Love your work.
They alert just once per candle (or, as it is case today, when you change to the chart where the limit is exceeded)
 

PS: you can use this one (some moving left to right avoided in this one when DisplayAutoCenetr chosen) :

#property indicator_chart_window

extern int    DisplayXPos             = 150;
extern int    DisplayYPos             = 20;
extern string DisplayID               = "comment";
extern string DisplayText             = "Volatility";
extern color  DisplayColorNormal      = clrGray;
extern color  DisplayColorAboveLevel  = clrLimeGreen;
extern int    DisplayFontSize         = 15;
extern double DisplayLevel            = 5;
extern bool   DisplayAutoCenter       = true;
extern bool   alertsOn                = false;
extern bool   alertsOnCurrent         = true;
extern bool   alertsMessage           = true;
extern bool   alertsSound             = false;
extern bool   alertsEmail             = false;


#include <ChartObjects\ChartObjectsTxtControls.mqh> 
CChartObjectLabel  label;

//
//
//
//
//

int init()   {                 return(0); }
int deinit() { label.Delete(); return(0); }
int start()
{
   double pips = iATR(NULL,0,1,0)/(_Point*MathPow(10,MathMod(_Digits,2)));
   
   if (label.Name()!= DisplayID)
       label.Create(0,DisplayID,0,DisplayXPos,DisplayYPos);
       label.Description(DisplayText+" "+(string)pips+" pips");
       label.FontSize(DisplayFontSize); 
       label.Font("Arial bold"); 
       if (DisplayLevel>pips)
               { label.Color(DisplayColorNormal); }
       else    { label.Color(DisplayColorAboveLevel); if (alertsOn) doAlert(DisplayText+" exceeded "+(string)DisplayLevel+" pips"); }
       if (DisplayAutoCenter)
       {
            label.X_Distance(ChartGetInteger(0,CHART_WIDTH_IN_PIXELS)/2); label.Anchor(ANCHOR_CENTER); 
       }         
       
   return(0);
}

//+--------------------------------------------------------------------------------------+
//|                                                                                      |
//+--------------------------------------------------------------------------------------+
//
//
//
//
//

void doAlert(string doWhat)
{
   static string   previousAlert="nothing";
   static datetime previousTime;
   string message;
   
      if (previousAlert != doWhat || previousTime != Time[0]) {
          previousAlert  = doWhat;
          previousTime   = Time[0];

          //
          //
          //
          //
          //

          message = _Symbol+" at "+TimeToStr(TimeLocal(),TIME_SECONDS)+doWhat;
             if (alertsMessage) Alert(message);
             if (alertsEmail)   SendMail(_Symbol+DisplayText,message);
             if (alertsSound)   PlaySound("alert2.wav");
      }
}
 
alanmia:
Can somebody please have a look at this indi for me, it just freezes my Mt4 every time i load it, i am on build 1010.
not working
 
traderduke:

Mladen

I was wondering if you or anybody recognizes this indicator and has a more stable version. I don't have the source file but it looks like a TMA and it repaints a lot. I'm looking for some channel indicator to use on Renko.

Thanks You


Ray 

That is a centered tma bands indicator (you can find it here : https://www.mql5.com/en/forum/181241 )
 
Nikki69:
not working

Try this

 

Wave trend oscillator indicator (with the usual set of 20 price types, usual choices of color and alert changes, and multi time frame already). Seems to be useful for overbought and oversold detection


Files:
Reason: