You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
razo There is no such Donchian channel
Let's do one ?
Need your blessing here,it compiles fine,can you please look for logic bugs? Thx
#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 DodgerBlue
#property indicator_color2 Crimson
#property indicator_width1 1
#property indicator_width2 1
double top[];
double bottom[];
extern int candles=5;
extern int PipsDiff=500;
extern bool precision=true;
int init()
{
IndicatorShortName("DonPips");
SetIndexBuffer(0,top);
SetIndexBuffer(1,bottom);
SetIndexStyle(0,DRAW_LINE);
SetIndexStyle(1,DRAW_LINE);
SetIndexLabel(0,"top");
SetIndexLabel(1,"bottom");
return(0);
}
int start()
{
int counted_bars = IndicatorCounted();
if(counted_bars < 0) return(-1);
if(counted_bars > 0) counted_bars--;
int i = Bars - counted_bars;
if(counted_bars==0) i-=1+1;
while(i>=0)
{
double u=iHigh(NULL,0,iHighest(NULL,0,MODE_HIGH,candles,i));
double l=iLow(NULL,0,iLowest(NULL,0,MODE_LOW,candles,i));
if(iHigh(NULL,0,i)>top || iLow(NULL,0,i)<bottom)
{
if(iHigh(NULL,0,i)>top)
{
top=iHigh(NULL,0,i);
if(top-bottom>PipsDiff*Point)
bottom=top-PipsDiff*Point;
else
bottom=bottom;
}
if(iLow(NULL,0,i)<bottom)
{
bottom=iLow(NULL,0,i);
if(top-bottom>PipsDiff*Point)
top=bottom+PipsDiff*Point;
else
top=top;
}
}
else
{
top=top;
bottom=bottom;
}
if(precision==false)
{
if(top>u)
top=u;
if(bottom<l)
bottom=l;
}
i--;
}
return(0);
}
Let's do one ?
Need your blessing here,it compiles fine,can you please look for logic bugs? Thx
#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 DodgerBlue
#property indicator_color2 Crimson
#property indicator_width1 1
#property indicator_width2 1
double top[];
double bottom[];
extern int candles=5;
extern int PipsDiff=500;
extern bool precision=true;
int init()
{
IndicatorShortName("DonPips");
SetIndexBuffer(0,top);
SetIndexBuffer(1,bottom);
SetIndexStyle(0,DRAW_LINE);
SetIndexStyle(1,DRAW_LINE);
SetIndexLabel(0,"top");
SetIndexLabel(1,"bottom");
return(0);
}
int start()
{
int counted_bars = IndicatorCounted();
if(counted_bars < 0) return(-1);
if(counted_bars > 0) counted_bars--;
int i = Bars - counted_bars;
if(counted_bars==0) i-=1+1;
while(i>=0)
{
double u=iHigh(NULL,0,iHighest(NULL,0,MODE_HIGH,candles,i));
double l=iLow(NULL,0,iLowest(NULL,0,MODE_LOW,candles,i));
if(iHigh(NULL,0,i)>top || iLow(NULL,0,i)<bottom)
{
if(iHigh(NULL,0,i)>top)
{
top=iHigh(NULL,0,i);
if(top-bottom>PipsDiff*Point)
bottom=top-PipsDiff*Point;
else
bottom=bottom;
}
if(iLow(NULL,0,i)<bottom)
{
bottom=iLow(NULL,0,i);
if(top-bottom>PipsDiff*Point)
top=bottom+PipsDiff*Point;
else
top=top;
}
}
else
{
top=top;
bottom=bottom;
}
if(precision==false)
{
if(top>u)
top=u;
if(bottom<l)
bottom=l;
}
i--;
}
return(0);
}razo
You are missing the channel breakout almost completely :
As you can see there is only one breakout in that example, and after that the channel continues in a wrong direction (if we take the breakout as the criteria for forming the upper or lower band).
Without breakouts, that indicator uses its all functionality - that issue has to be solved or else it is just a high low channel like indicator with minimal height (which will work OK on some time frames and symbols, but not on another time frames or symbols)
razo
You are missing the channel breakout almost completely :
Mladen,u right ok, I see your point,thanks...
Just changed the buffers by pinning it to the Open of the bar,it appears to be working in perfect sync with an identical pips length ZigZag ( Orlova tweaked on Open too )... the added bonus : no repainting of the past,it just extends its current leg. Could you please help with alerts ?
double u=iOpen(NULL,0,iHighest(NULL,0,MODE_OPEN,candles,i));
double l=iOpen(NULL,0,iLowest(NULL,0,MODE_OPEN,candles,i));
if(iOpen(NULL,0,i)>top || iOpen(NULL,0,i)<bottom)
{
if(iOpen(NULL,0,i)>top)
{
top=iOpen(NULL,0,i);
if(top-bottom>PipsDiff*Point)
bottom=top-PipsDiff*Point;
else
bottom=bottom;
}
if(iOpen(NULL,0,i)<bottom)
{
bottom=iOpen(NULL,0,i);
Mladen,u right ok, I see your point,thanks...
Just changed the buffers by pinning it to the Open of the bar,it appears to be working in perfect sync with an identical pips length ZigZag ( Orlova tweaked on Open too )... the added bonus : no repainting of the past,it just extends its current leg. Could you please help with alerts ?
double u=iOpen(NULL,0,iHighest(NULL,0,MODE_OPEN,candles,i));
double l=iOpen(NULL,0,iLowest(NULL,0,MODE_OPEN,candles,i));
if(iOpen(NULL,0,i)>top || iOpen(NULL,0,i)<bottom)
{
if(iOpen(NULL,0,i)>top)
{
top=iOpen(NULL,0,i);
if(top-bottom>PipsDiff*Point)
bottom=top-PipsDiff*Point;
else
bottom=bottom;
}
if(iOpen(NULL,0,i)<bottom)
{
bottom=iOpen(NULL,0,i);razo
ZigZag must adjust the past legs (you are using iHighest and iLowest - if those change - and it can but on the next opened bar. so will the zigzag )
Anybody has the "buysell5code" indicator?
Anybody has the "buysell5code" indicator?
Did you check this : https://www.mql5.com/en/forum/173574/page313
Did you check this : https://www.mql5.com/en/forum/173574/page313
Yes, that is it. Thanks :0
Hello
does anyone know about this indicator ??
Hello
does anyone know about this indicator ??
How can that thing be used?
hi all,
Anybody else knows about this indicator? The web site has no more.
100% No Repaint MT4 Indicator- Made for Binary Options- 95% Accuracy!
http://starwinnerindicator.com
https://www.youtube.com/watch?v=U0KGDXqoU4g