Posted a version here Volatility indicatorsPumbaPLS wrote: Fri Mar 18, 2022 3:07 am Hey, would it be possible to add "Volatility valid/low" text for that indicator, same way it is in my other subwindow?
Above green MA = Volatility valid
Underneath green MA = Volatility low
Re: MT4 Indicator requests and ideas
15142Dear Coder
Please add:
1/ MTF 2/ Unique ID
3/ Push Notiication Here is the code of the indicator.
Thank you.
Kind Regards
DTRCT
Please add:
1/ MTF 2/ Unique ID
3/ Push Notiication Here is the code of the indicator.
Code: Select all
//+------------+-----------------------------------------------------+
//| v.22.04.05 | up and Down.mq4 |
//| Copyright © 2005, MetaQuotes Software Corp. |
//| http://www.metaquotes.net/ |
//+------------------------------------------------------------------+
#property copyright "UP&DOWN ARROW ALERT Copyright © 2020, MetaQuotes Software Corp."
#property link "http://www.metaquotes.net/"
#property indicator_chart_window
#property indicator_buffers 7
#property indicator_color1 clrNONE
#property indicator_color2 clrLimeGreen
#property indicator_color3 clrRed
#property indicator_color4 Red
#property indicator_color5 Blue
#property indicator_color6 Red
#property indicator_color7 Blue
#property indicator_width5 2
#property indicator_width7 2
#property indicator_width4 2
#property indicator_width6 2
#define PREFIX ""
extern int Periodic = 14;
extern color ArrowOnUpColor = LimeGreen;
extern color ArrowOnDnColor = Red;
extern int ArrowDnCode = 234;
extern int ArrowUpCode = 233;
extern int ArrowSize = 5;
extern int ArrowGap = 1;
extern bool AlertsMessage = false;
extern bool AlertsSound = false;
extern string SoundFile = "wait.wav";
bool b=1,s=1;
datetime t=0, ta=0;
double begin_sign[],up[],dn[];
double trend_Up[];
double trend_Dn[];
double trend_Up_top[];
double trend_Dn_down[];
// -------------------------------------------------------------------------------------------------------------
int init()
{
SetIndexBuffer(0,begin_sign);
IndicatorShortName("UP&DOWN ARROW");
SetIndexLabel(0,"begin_sign");
SetIndexStyle(1, DRAW_ARROW, EMPTY,ArrowSize,ArrowOnUpColor);
SetIndexArrow(1, ArrowUpCode);
SetIndexDrawBegin(1,0.0);
SetIndexBuffer(1,up);
SetIndexLabel(1,"up");
SetIndexStyle(2, DRAW_ARROW, EMPTY,ArrowSize,ArrowOnDnColor);
SetIndexArrow(2, ArrowDnCode);
SetIndexDrawBegin(2,0.0);
SetIndexBuffer(2,dn);
SetIndexLabel(2,"dn");
SetIndexBuffer(3,trend_Up);
SetIndexStyle(3,DRAW_LINE,STYLE_DOT);
SetIndexLabel(3,"trend_Up");
// SetIndexArrow(2,233);
SetIndexBuffer(4,trend_Dn);
SetIndexStyle(4,DRAW_LINE,STYLE_DOT);
SetIndexLabel(4,"trend_Dn");
SetIndexBuffer(5,trend_Up_top);
SetIndexStyle(5,DRAW_LINE,STYLE_DOT);
SetIndexLabel(5,"trend_Up_top");
// SetIndexArrow(2,233);
SetIndexBuffer(6,trend_Dn_down);
SetIndexStyle(6,DRAW_LINE,STYLE_DOT);
SetIndexLabel(6,"trend_Dn_down");
ta=Time[0];
return(0);
}
// -------------------------------------------------------------------------------------------------------------
int deinit()
{
for(int i = ObjectsTotal()-1; i >= 0; i--)
if(StringSubstr(ObjectName(i), 0, StringLen(PREFIX)) == PREFIX)
ObjectDelete(ObjectName(i));
return(0);
}
// -------------------------------------------------------------------------------------------------------------
int start()
{
int limit;
int counted_bars;
//double prev, current, old;
double Value=0,Value1=0,Value2=0,ndelta=0,ndelta1=0,ndelta2=0;
double price;
double MinL=0;
double MaxH=0;
counted_bars = IndicatorCounted();
if(counted_bars > 0)
counted_bars--;
limit = Bars - counted_bars;
for(int i=0; i<=limit; i++)
{
MaxH = High[iHighest(NULL,0,MODE_CLOSE,Periodic,i)];
MinL = Low[iLowest(NULL,0,MODE_CLOSE,Periodic,i)];
price = (Open[i]+ Close[i])/2;
if(MaxH-MinL == 0)
Value = 0.33*2*(0-0.5) + 0.67*Value1;
else
Value = 0.33*2*((price-MaxH)/(MinL-MaxH)-0.5) + 0.67*Value1;
Value=MathMin(MathMax(Value,-0.999999),0.9999999);
if(1-Value == 0)
begin_sign[i]=0.5+0.5*ndelta1;
else
begin_sign[i]=0.5*MathLog((1+Value)/(1-Value))+0.5*ndelta1;
Value1=Value;
ndelta1=begin_sign[i];
if(begin_sign[i]<0 )
{
trend_Up[i]=Low[i];
trend_Up_top[i]=High[i];
}
if(begin_sign[i]>0 )
{
trend_Dn[i]=Low[i];
trend_Dn_down[i]=High[i];
}
if(t!=Time[0])
{
if(begin_sign[i]>0 && begin_sign[i-1]<0 && b)
{
up[i]=Low[i]-5*ArrowGap*Point;
if(ta<Time[0])
{
if(AlertsMessage) Alert(Symbol(), (" M"), Period()," ", " UP&DOWN ARROW : BUY!");
if (AlertsSound) PlaySound(SoundFile);
ta=Time[0];
}
b=0;
s=1;
}
if(begin_sign[i]<0 && begin_sign[i-1]>0 && s)
{
dn[i]=High[i]+5*ArrowGap*Point;;
if(ta<Time[0])
{
if(AlertsMessage) Alert(Symbol(), (" M"), Period()," "," UP&DOWN ARROW : SELL!");
if (AlertsSound) PlaySound(SoundFile);
ta=Time[0];
}
s=0;
b=1;
}
}
}
return(0);
}
//========================================
string PeriodString()
{
switch (_Period)
{
case PERIOD_M1: return("M1");
case PERIOD_M5: return("M5");
case PERIOD_M15: return("M15");
case PERIOD_M30: return("M30");
case PERIOD_H1: return("H1");
case PERIOD_H4: return("H4");
case PERIOD_D1: return("D1");
case PERIOD_W1: return("W1");
case PERIOD_MN1: return("MN1");
default: return("M"+(string)_Period);
}
return("M"+(string)_Period);
}
Kind Regards
DTRCT
Re: MT4 Indicator requests and ideas
15143That a repainting version of Ehler's fisher transform, we have a bunch of non-repainting versions here in the forum with mtf.DTRCT wrote: Fri Mar 18, 2022 3:53 pm Dear Coder
Please add:
1/ MTF
2/ Unique ID
3/ Push Notiication
Here is the code of the indicator.Thank you.Code: Select all
//+------------+-----------------------------------------------------+ //| v.22.04.05 | up and Down.mq4 | //| Copyright © 2005, MetaQuotes Software Corp. | //| http://www.metaquotes.net/ | //+------------------------------------------------------------------+ #property copyright "UP&DOWN ARROW ALERT Copyright © 2020, MetaQuotes Software Corp." #property link "http://www.metaquotes.net/" #property indicator_chart_window #property indicator_buffers 7 #property indicator_color1 clrNONE #property indicator_color2 clrLimeGreen #property indicator_color3 clrRed #property indicator_color4 Red #property indicator_color5 Blue #property indicator_color6 Red #property indicator_color7 Blue #property indicator_width5 2 #property indicator_width7 2 #property indicator_width4 2 #property indicator_width6 2 #define PREFIX "" extern int Periodic = 14; extern color ArrowOnUpColor = LimeGreen; extern color ArrowOnDnColor = Red; extern int ArrowDnCode = 234; extern int ArrowUpCode = 233; extern int ArrowSize = 5; extern int ArrowGap = 1; extern bool AlertsMessage = false; extern bool AlertsSound = false; extern string SoundFile = "wait.wav"; bool b=1,s=1; datetime t=0, ta=0; double begin_sign[],up[],dn[]; double trend_Up[]; double trend_Dn[]; double trend_Up_top[]; double trend_Dn_down[]; // ------------------------------------------------------------------------------------------------------------- int init() { SetIndexBuffer(0,begin_sign); IndicatorShortName("UP&DOWN ARROW"); SetIndexLabel(0,"begin_sign"); SetIndexStyle(1, DRAW_ARROW, EMPTY,ArrowSize,ArrowOnUpColor); SetIndexArrow(1, ArrowUpCode); SetIndexDrawBegin(1,0.0); SetIndexBuffer(1,up); SetIndexLabel(1,"up"); SetIndexStyle(2, DRAW_ARROW, EMPTY,ArrowSize,ArrowOnDnColor); SetIndexArrow(2, ArrowDnCode); SetIndexDrawBegin(2,0.0); SetIndexBuffer(2,dn); SetIndexLabel(2,"dn"); SetIndexBuffer(3,trend_Up); SetIndexStyle(3,DRAW_LINE,STYLE_DOT); SetIndexLabel(3,"trend_Up"); // SetIndexArrow(2,233); SetIndexBuffer(4,trend_Dn); SetIndexStyle(4,DRAW_LINE,STYLE_DOT); SetIndexLabel(4,"trend_Dn"); SetIndexBuffer(5,trend_Up_top); SetIndexStyle(5,DRAW_LINE,STYLE_DOT); SetIndexLabel(5,"trend_Up_top"); // SetIndexArrow(2,233); SetIndexBuffer(6,trend_Dn_down); SetIndexStyle(6,DRAW_LINE,STYLE_DOT); SetIndexLabel(6,"trend_Dn_down"); ta=Time[0]; return(0); } // ------------------------------------------------------------------------------------------------------------- int deinit() { for(int i = ObjectsTotal()-1; i >= 0; i--) if(StringSubstr(ObjectName(i), 0, StringLen(PREFIX)) == PREFIX) ObjectDelete(ObjectName(i)); return(0); } // ------------------------------------------------------------------------------------------------------------- int start() { int limit; int counted_bars; //double prev, current, old; double Value=0,Value1=0,Value2=0,ndelta=0,ndelta1=0,ndelta2=0; double price; double MinL=0; double MaxH=0; counted_bars = IndicatorCounted(); if(counted_bars > 0) counted_bars--; limit = Bars - counted_bars; for(int i=0; i<=limit; i++) { MaxH = High[iHighest(NULL,0,MODE_CLOSE,Periodic,i)]; MinL = Low[iLowest(NULL,0,MODE_CLOSE,Periodic,i)]; price = (Open[i]+ Close[i])/2; if(MaxH-MinL == 0) Value = 0.33*2*(0-0.5) + 0.67*Value1; else Value = 0.33*2*((price-MaxH)/(MinL-MaxH)-0.5) + 0.67*Value1; Value=MathMin(MathMax(Value,-0.999999),0.9999999); if(1-Value == 0) begin_sign[i]=0.5+0.5*ndelta1; else begin_sign[i]=0.5*MathLog((1+Value)/(1-Value))+0.5*ndelta1; Value1=Value; ndelta1=begin_sign[i]; if(begin_sign[i]<0 ) { trend_Up[i]=Low[i]; trend_Up_top[i]=High[i]; } if(begin_sign[i]>0 ) { trend_Dn[i]=Low[i]; trend_Dn_down[i]=High[i]; } if(t!=Time[0]) { if(begin_sign[i]>0 && begin_sign[i-1]<0 && b) { up[i]=Low[i]-5*ArrowGap*Point; if(ta<Time[0]) { if(AlertsMessage) Alert(Symbol(), (" M"), Period()," ", " UP&DOWN ARROW : BUY!"); if (AlertsSound) PlaySound(SoundFile); ta=Time[0]; } b=0; s=1; } if(begin_sign[i]<0 && begin_sign[i-1]>0 && s) { dn[i]=High[i]+5*ArrowGap*Point;; if(ta<Time[0]) { if(AlertsMessage) Alert(Symbol(), (" M"), Period()," "," UP&DOWN ARROW : SELL!"); if (AlertsSound) PlaySound(SoundFile); ta=Time[0]; } s=0; b=1; } } } return(0); } //======================================== string PeriodString() { switch (_Period) { case PERIOD_M1: return("M1"); case PERIOD_M5: return("M5"); case PERIOD_M15: return("M15"); case PERIOD_M30: return("M30"); case PERIOD_H1: return("H1"); case PERIOD_H4: return("H4"); case PERIOD_D1: return("D1"); case PERIOD_W1: return("W1"); case PERIOD_MN1: return("MN1"); default: return("M"+(string)_Period); } return("M"+(string)_Period); }
Kind Regards
DTRCT
Re: MT4 Indicator requests and ideas
15144Hello,
Could the APB Candle indicator be adjusted MrTools?
I am not sure if it got purposely made this way, but it would be great if it could be changed to a "normal" EMA channel. This way it would filter out much better (in my opinion)
Could the APB Candle indicator be adjusted MrTools?
I am not sure if it got purposely made this way, but it would be great if it could be changed to a "normal" EMA channel. This way it would filter out much better (in my opinion)
You cannot solve a problem from the same consciousness that created it. You must learn to see the world anew
Re: MT4 Indicator requests and ideas
15145Hi, I like this great Gaussian MA a lot. Is it possible to add some kind of Channel to it (any kind)? Thank you!
Re: MT4 Indicator requests and ideas
15146Leave the candles as is?PumbaPLS wrote: Fri Mar 18, 2022 9:31 pm Hello,
Could the APB Candle indicator be adjusted MrTools?
I am not sure if it got purposely made this way, but it would be great if it could be changed to a "normal" EMA channel. This way it would filter out much better (in my opinion)
Re: MT4 Indicator requests and ideas
15147Posted a version here Band type indicatorsmaxus182 wrote: Mon Mar 21, 2022 1:30 am Hi, I like this great Gaussian MA a lot. Is it possible to add some kind of Channel to it (any kind)? Thank you!
Re: MT4 Indicator requests and ideas
15148just as before the function should be as long APB candles dont break out of the Channel (and close) the wick is grey
You cannot solve a problem from the same consciousness that created it. You must learn to see the world anew
Re: MT4 Indicator requests and ideas
15149Check here Heiken ashi indicatorsPumbaPLS wrote: Mon Mar 21, 2022 3:56 am just as before the function should be as long APB candles dont break out of the Channel (and close) the wick is grey
Re: MT4 Indicator requests and ideas
15150mrtools, could you please add a unique ID to this indicator, so it can be put on the chart more than 1 time with different MTF settings. Thank you!