Learn How To Fish

Status
Not open for further replies.

VJAY

Well-Known Member
Have you checked the Zig fn and AFLs based on the ZigZag indicator?

One very good advantage is that you can set it percentage, say 0.5 for intra, so its able to filter all the noise out.

Code:
_SECTION_BEGIN("Zig");

SetChartOptions(2,chartShowArrows | chartShowDates | chartWrapTitle );
ZigPC = 0.5;

ZZ = Zig(C,LastValue(ZigPC));
PivotLow = Ref(IIf(Ref(ROC(ZZ,1),-1) < 0 AND ROC(ZZ,1) > 0, 1, Null),1);
PivotHigh = Ref(IIf(Ref(ROC(ZZ,1),-1) > 0 AND ROC(ZZ,1) < 0, 1, Null),1);
PlotShapes( IIf(PivotLow,shapeHollowSmallCircle,Null), colorGreen,0, L, -15);
PlotShapes( IIf(PivotHigh,shapeHollowSmallCircle,Null),colorRed,0,   H,  15);

BarColors = colorDefault;
Plot(C, " ", BarColors,  styleCandle ) ;
Plot(ZZ," ", colorLightGrey,styleLine);
Plot(ZZ," ", BarColors,styleDots|styleNoLine);


_SECTION_END();
Thanks josh & travi brother sharing codes .....yes its catching without noice mp's i think...still we not getting what exactly our all pivots.....IMO many tryed it for get exactly what we use to automate our trades ...though not know they success in it or not......

1542809505475.png
 

VJAY

Well-Known Member
Thanks, is this fine now? If not can u post ur mp markings


Sent from my RealMe1 using Tapatalk
Dear raju,
You can check my abv chart I marked mp's there and check it with your chart...as in some chart it may be differed as data difference....
 

travi

Well-Known Member
Thanks josh & travi brother sharing codes .....yes its catching without noice mp's i think...still we not getting what exactly our all pivots.....IMO many tryed it for get exactly what we use to automate our trades ...though not know they success in it or not......
In the sample code, you need to adjust Percentage, ZigPC this one.

If it is lower, it becomes more sensitive. try from 0.1 to 1 for intraday.
 

MSN1979

Well-Known Member
Lets Name all the candles
1542818091042.png

So we have candles c1 to c15

so we store open high low and close for each candle

use some kind of for loop to compare (tick value/ 15 seconds /60 seconds or your choice) with c1

once c2> c1
increase counter
in this case c1.highis >c2.high
don't increase counter
move to compare c3 with c1
is c3.high>c1.high
no
move to compare c4 with c1
is c4.high>c1.high
keep doing this till c8
now c8 high broke c1 high
increase counter to 1
also store candle number this time = c8 in some variable
when counter is increased to 1 now we compare last candle that increased counter
is c8.high>c9.high
no
move to compare c10 with c8
is c8.high>c10.high
keep doing this till c15
now c8 high broke c15 high
increase counter to 2
once counter hits 2
mark start point lowas mpl
c1.low is mpl
set counter to back to zero
exit for and if loops

we can do this for reversals as well
 
Last edited:

raju.vzm

Well-Known Member
Dear raju,
You can check my abv chart I marked mp's there and check it with your chart...as in some chart it may be differed as data difference....
Thanks Vijay for the chart, got a doubt by seeing your chart. Though mpl and mph happened at same candle, isn't it a becomes vph as next candles broke down this mpl?

Or can we ignore them as these mp's formed inside range of previous pivots?



Sent from my RealMe1 using Tapatalk
 

VJAY

Well-Known Member
Thanks Vijay for the chart, got a doubt by seeing your chart. Though mpl and mph happened at same candle, isn't it a becomes vph as next candles broke down this mpl?

Or can we ignore them as these mp's formed inside range of previous pivots?



Sent from my RealMe1 using Tapatalk
Yes... we ignore it as its in minor sideways
 

XRAY27

Well-Known Member
Last edited:
Status
Not open for further replies.

Similar threads