Hi, I’d appreciate help with a multi timeframe screener please. Basically a pin bar (hammer, inverted, hanging man or shooting star) on M15 with an established trend (using EMA for the trend) in a higher timeframe, H1.
bb=body<=(range/3)//body no longer than 1/3 of the range
L1=LOWERwick>=(range/3*2)//LONG: lower wick at least 2/3 of the range
S1=UPPERwick>=(range/3*2)//SHORT: upper wick at least 2/3 of the range
L2=low=lowest[N](low)//LONG: must be the lowest price in the last N periods
S2=high=highest[N](high)//SHORT: must be the highest price in the last N periods
Timeframe(default)
Lcond=UPANDbbANDL1ANDL2
Scond=DOWNANDbbANDS1ANDS2
Result=0
IFLcondTHEN
Result=1
ELSIFScondTHEN
Result=2
ENDIF
SCREENER[Result](ResultAS"1=↑, 2=↓")
I used SMAs instead of EMAs, because with the old ProScreener 100 periods are too many for EMAs as they need more than 254 bars to be calculated. If you lower the periods from 100 to approximately 70-80, or if you have the new version of ProScreener, just replace “,0]” with “,1]” when AVERAGE is used.
I also added that PinBARs have to show only when they are at a highest or lowest. You can set N to any lookback period you need (no more than 254 with old ProScreener). To disable this feature, simply replace lines 15-16 with:
1
2
L2=1//low = lowest[N](low) //LONG: must be the lowest price in the last N periods
S2=1//high = highest[N](high) //SHORT: must be the highest price in the last N periods
To help us continually offer you the best experience on ProRealCode, we use cookies. By clicking on "Continue" you are agreeing to our use of them. You can also check our "privacy policy" page for more information.Continue