UDAY_C_Santhakumar

UCS_S_Stochastic Pop and Drop Strategy

My Contribution to Jake Bernstein Educational Series, Initiated by Chris Moody.

The Stochastic Pop was developed by Jake Bernstein and modified by David Steckler. Bernstein's original Stochastic Pop is a trading strategy that identifies price pops when the Stochastic Oscillator surges above 80. Steckler modified this strategy by adding conditional filters using the Average Directional Index (ADX) and the weekly Stochastic Oscillator.

Modifications
1. Weekly Stochastic Oscillator for Trading Bias = 5* Daily Stochastic
2. Optional Volume Confirmation, Custom Average Volume Length


Future Plans
1. Adding Triggers for Entry, Stops and Target. - This will be release when we have ability to code the complete Strategy. Although it can be done with the current pinescript options, it would be far more easier if we have strategy ability.


Link for Educational Purpose
stockcharts.com...school/doku.php?id=chart_s...

-
Good Luck Trading
UCSgears

Uday C Santhakumar
开源脚本

本着真正的TradingView精神,该脚本的作者将其开源发布,以便交易者可以理解和验证它。为作者喝彩!您可以免费使用它,但在出版物中重复使用此代码受网站规则的约束。 您可以收藏它以在图表上使用。

免责声明

这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。

想在图表上使用此脚本?
// Developed by Jake Bernstein
// Modified by David Steckler - Includes ADX Confirmation
// Modified by UCSgears - Optional Volume Confirmation
// Coded by UCSgears - Stochastic Pop and Drop Version 1

study(title="UCS_Stochastic Pop and Drop", shorttitle="UCS_JB SPOD", overlay = true)

// Input - Options
vlen = input(100, title="Volume Average Length")
vconf = input(true, title = "Volume Confirmation", type=bool)
steck = input(true, title = "David Steckler Modification", type=bool)
psl = input(true, title = "Plot Stop Loss", type = bool)

// Trading Bias
tbk = sma(stoch(close, high, low, 70), 3)
tbbull = tbk > 50
tbbear = tbk < 50

//Setup Definition
sdk = sma(stoch(close, high, low, 14), 3)
sdl = sdk > 80 and sdk[1] < 80
sds = sdk < 20 and sdk[1] > 20

// ADX Confirmation
up = change(high)
down = -change(low)
trur = rma(tr, 14)
plus = fixnan(100 * rma(up > down and up > 0 ? up : 0, 14) / trur)
minus = fixnan(100 * rma(down > up and down > 0 ? down : 0, 14) / trur)
sum = plus + minus 
adx = 100 * rma(abs(plus - minus) / (sum == 0 ? 1 : sum), 14)
adxc = adx < 20

// Volume Confirmation
volma = sma(volume, vlen)
volconf = volume > volma

// Setup Long 
sl = (steck and vconf) ? volconf == 1 and adxc == 1 and sdl == 1 and tbbull == 1 : (steck ==1 and vconf != 1) ? adxc == 1 and sdl == 1 and tbbull == 1 : (steck !=1 and vconf == 1) ? volconf == 1 and sdl == 1 and tbbull == 1 : sdl == 1 and tbbull == 1
// Setup Short
ss = (steck and vconf) ? volconf == 1 and adxc == 1 and sds == 1 and tbbear == 1 : (steck ==1 and vconf != 1) ? adxc == 1 and sds == 1 and tbbear == 1 : (steck !=1 and vconf == 1) ? volconf == 1 and sds == 1 and tbbear == 1 : sds == 1 and tbbear == 1

plotchar(sl, title="Long Setup", char='⇑', location=location.belowbar, color=green, transp=0, text="SPOD Long")
plotchar(ss, title="Short Setup", char='⇓', location=location.abovebar, color=red, transp=0, text="SPOD Short")

bc = sl == 1 ? green : ss == 1 ? red : na
barcolor(bc)
bgcolor(bc)

// Stop Loss
parsar = psl ? sar(0.02, 0.02, 0.2) : na
sc = psl and parsar < close ? green : red
plot(psl ? parsar : na, color=sc, linewidth = 2, style = circles)