Can any body make this 3 inside bar strategy afl?

KelvinHand

Well-Known Member
#11
but to form triangle or pennant flag I think few more bars(like 5-8 bars I think) are required...
beg ur pardon KelvinHand ji if I misunderstood...
Why are you so rigid ?
Go down to lower timeframe, you will see your 5-8 bars.
In your picture, on the hourly is a compression of 8 bars in 15min, meet your requirement.
In 5min is 12 bars of hourly, then cannot satisfied your requirement ?


All these 2xIBs ... etc, are just 1 part of consolidation pattern in swing trading.
Too specific on this pattern only, will miss other pattern



Book Recommended: Dave Landry - On Swing Trading
 
Last edited:
#12
Hello


coding for all these patterns is v easy in amibroker . . . but their are soooo many variations
so its not practical to plot everything on charts . . .

these patterns can manifest as flags // triangles // pennant and what not

basically we are looking for congestion or sideways or resting pattern . . .

resting as in price is resting for a while before it makes another move, usually this gives us a new move in previous trend direction, we should be looking at a very specific occurrence for e.g.

a range made by 1 or more bars, then sideways within that range, look for if this sideways is mostly within upper // lower part of the range, that can give us the bias

Happy :)
 
#14
nice pic subroto

combine both the codes posted by me we can get both in a single line afl :)

Code:
PlotShapes(IIf((Ref(H,-1) < Ref(H,-2) AND Ref(L,-1) > Ref(L,-2)), IIf(H < Ref(H,-1) AND L > Ref(L,-1), shapeDigit2,  IIf(H < Ref(H,-2) AND L > Ref(L,-2), shapeDigit1, shapeNone)),shapeNone),colorLightGrey,0,L,-30);
Happy :)
 
Last edited:

Bewinner

Well-Known Member
#15
nice pic subroto

combine both the codes posted by me we can get both in a single line afl :)

Code:
PlotShapes(IIf((Ref(H,-1) < Ref(H,-2) AND Ref(L,-1) > Ref(L,-2)), IIf(H < Ref(H,-1) AND L > Ref(L,-1), shapeDigit2,  IIf(H < Ref(H,-2) AND L > Ref(L,-2), shapeDigit1, shapeNone)),shapeNone),colorLightGrey,0,L,-30);
Happy :)
Happy ji..Thanx for ur effort..it is really nice

and I also mentioned it bhai at 10.28 am post -
"But must say accidentally what I got in ur previous code that is also powerful..."
 

Bewinner

Well-Known Member
#16
Bewinner

r u looking at this stuff?



or this 1?


or this 1?


or


rgds subroto
for me first 3 images are ok...but not the last one... but mind it in some cases 1st 2 bars also almost remains the same like may be the difference between 2 candles might be 5-10 paise..what I have seen I am telling u...by the way 1st one is typical triangle/pennant flag pattern..that is different from my initial requirements but if can anybody code this..it will be good
 

rvlv

Active Member
#17
Hi subroto jee

Thanks for the charts.

Is it that these patterns work on intraday more?
can these be coded in single afl,not urgently,of course!

regards
rvlv
 

Bewinner

Well-Known Member
#18
Why are you so rigid ?
Go down to lower timeframe, you will see your 5-8 bars.
In your picture, on the hourly is a compression of 8 bars in 15min, meet your requirement.
In 5min is 12 bars of hourly, then cannot satisfied your requirement ?


All these 2xIBs ... etc, are just 1 part of consolidation pattern in swing trading.
Too specific on this pattern only, will miss other pattern



Book Recommended: Dave Landry - On Swing Trading
Kelvin bhai...kitna kuch kahe diya bhai...I am not rigid bro...what thing I observed I just came forward and asked for help...
The patterns u have shown to us believe me I am looking for such codes for Amibroker which identify these kinds of pattern also...but I am not getting those codes anywhere...even patternexplorer afl does not suit the needs...so if anybody be kind enough to code all these kind of pattern that will be great...

Thanx for the book recommendation...I will definitely try to read.

Rgds,
Bewinner...
 
#19
Code:
IB1		=	Ref(H,-1) < Ref(H,-2) AND Ref(L,-1) > Ref(L,-2) AND H < Ref(H,-1) AND L > Ref(L,-1);
IB2		=	Ref(H,-1) < Ref(H,-2) AND Ref(L,-1) > Ref(L,-2) AND H < Ref(H,-2) AND L > Ref(L,-2);
IB3		=	Ref(IB2,-1) AND H < Ref(H,-3) AND L > Ref(L,-3);
IB4		=	Ref(IB3,-1) AND H < Ref(H,-4) AND L > Ref(L,-4);
IB5		=	Ref(IB4,-1) AND H < Ref(H,-5) AND L > Ref(L,-5);
IB6		=	Ref(IB5,-1) AND H < Ref(H,-6) AND L > Ref(L,-6);
IB7		=	Ref(IB6,-1) AND H < Ref(H,-7) AND L > Ref(L,-7);
Shape	=	IIf(IB7,shapeDigit7, IIf(IB6,shapeDigit6,  IIf(IB5,shapeDigit5, 
			IIf(IB4,shapeDigit4, IIf(IB3,shapeDigit3,  IIf(IB1,shapeHollowStar, 
			IIf(IB2,shapeDigit2, shapeNone)))))));
PlotShapes(Shape,colorLightGrey,0,L,-30);
More elaborate code to mark IB2-IB7 candles hollow star is the 3 bar triangle originally requested by BW

neat piece of code but i feel it clutters the charts, I prefer cleaner chart as these kind pf congestions are easily spotted on the charts



Happy :)




Finally some follow-through on BNF
 

Similar threads