Elite indicators :) - page 1321

Dimi.A
168
Dimi.A  
KumoBreake:
AUD is weak , change ur offer to jpy :)))
Even better bro ¥50 is $5 AUD haha
Mladen Rakic
151205
Mladen Rakic  
Dimi.A:
Ok, thanks chief.

I'm offering $50 AUD to anyone who can code it for me. Here's the request thread on Forex Factory.
If any one can do it, I'll be very grateful.

Why when you already have that (the ATR(1))?

None of my business, but you are just wasting your money

Dimi.A
168
Dimi.A  
mladen:

Why when you already have that (the ATR(1))?

None of my business, but you are just wasting your money

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.


Mladen Rakic
151205
Mladen Rakic  
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) :


Dimi.A
168
Dimi.A  
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? :)

Mladen Rakic
151205
Mladen Rakic  
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");
      }
}
Dimi.A
168
Dimi.A  
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.
Mladen Rakic
151205
Mladen Rakic  
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)
Mladen Rakic
151205
Mladen Rakic  

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");
      }
}
Nikki69
33
Nikki69  
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