UDAY_C_Santhakumar

UCS_S_Steve Primo - Strategy 1

Here is the code for Steve Primo Strategy #1 Long and Short Setups.

- Post your views and share the knowledge.

Watch his free videos on youtube for trigger and trade management

Uday C Santhakumar
開源腳本

本著真正的TradingView精神,該腳本的作者將其開源發布,以便交易者可以理解和驗證它。為作者喝彩吧!您可以免費使用它,但在出版物中重複使用此代碼受網站規則的約束。 您可以收藏它以在圖表上使用。

免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。

想在圖表上使用此腳本?
study(shorttitle="SP-S#1", title = "Steve Primo - Strategy #1", overlay = true, precision = 2)

//Indicator 1
lowerpc = lowest(low, 21)
upperpc = highest(high, 21)
midpc = avg(upperpc, lowerpc)

//Indicator 2
ma = sma(close, 50)
petd = ema(close,13)
rangema = ema(tr, 50)
upperkc = ma + rangema * 0.25
lowerkc = ma - rangema * 0.25

//Indicator 3
up = rma(max(change(close), 0), 5)
down = rma(-min(change(close), 0), 5)
rsi = down == 0 ? 100 : up == 0 ? 0 : 100 - (100 / (1 + up / down))

// PET-D
petdcolor = close > petd ? green : red
barcolor (petdcolor)


// ALL PLOT
plot (midpc, linewidth = 1, color = orange, title = "Mid Price Channel")
plot (upperpc, linewidth = 2, color = purple, title = "Upper Price Channel")
plot (lowerpc, linewidth = 2, color = purple, title = "Lower Price Channel")
plot (ma, linewidth = 3, color = black, title = "Trend - Long Term")
plot (petd, linewidth = 1, color = blue, title = "Trend - Short Term")

//Slope
SlopeL = midpc > midpc[5]
SlopeS = midpc < midpc[5]

//Condition
CL = SlopeL == 1 and close > lowerkc and close < midpc and rsi < 35 
CS = SlopeS == 1 and close < upperkc and close > midpc and rsi > 65 

//Setup
SL = CL == 1 and CL[1] != 1
SS = CS == 1 and CS[1] != 1

plotshape(SL, title="Long Setup Bar", style=shape.labelup, location=location.belowbar, color=lime, transp=25, text="SP #1 Long", textcolor = black)
plotshape(SS, title="Short Setup Bar", style=shape.labeldown, location=location.abovebar, color=orange, transp=25, text="SP #1 Short", textcolor = black)