Hi friends,
I’m not sure if this is possible especially the part about price going back and retesting a broken level but I’d really appreciate any help or suggestions on how best to approach it. Maybe I haven’t explained the chart perfectly, but I’m doing my best to describe the picture and setup I’m trying to capture.
Could you help me code a bullish screener that captures early reversal setups like the one shown in the attached chart? I’m happy for better suggestions.
Conditions to Detect:
Price bounce:
MACD bullish confirmation:
Stochastic Oscillator (14,3,5) confirmation:
Volume confirmation:
Let me know if it can be done or if there’s a better way to write it.
Thanks so much!
KR,
Hi. May this could be useful for you:
//------------------------------------------------//
//--- Inputs ---
//------------------------------------------------//
prd=10
//--- Pivot Low Detection ---
PivotLowDetected=low[prd]=lowest[2*prd+1](low)
if PivotLowDetected then
pl2=pl1
pl1=low[prd]
endif
//------------------------------------------------//
// --- Direction ---
//------------------------------------------------//
ema50=average[50](close)
if close < ema50 then
direction=-1
else
direction=1
endif
//------------------------------------------------//
// --- Setup ---
//------------------------------------------------//
crossSto=Stochastic[14,3](close) crosses over Stochasticd[14,3,5](close)
barsCross=barssince(crossSto)
if direction=-1 and pl1*1.01>pl2 and pl1*0.99<pl2 and macdline[12,26,9]>macdsignal[12,26,9] and barsCross>=0 and barsCross<=3 then
setup=1
else
setup=0
endif
//------------------------------------------------//
screener[setup and volume>1000000](barsCross as "Bars Cross")
JSParticipant
Senior
Creative screener, top…
To determine the trend direction, an EMA50 is used, but the instruction currently refers to an SMA50, this should be EMA50 = Average[50,1](Close)
I just want to remind about a 256-bar limit for screeners used in the complete version (the one provided by IG), so an EMA may roughly use 80 periods at most, not the full 256, due to its inner calculations.
The Premium version offered by PRT extends that limit to 1024 bars, thus an ema might support larger periods.