UDAY_C_Santhakumar

UCS_S_Steve Primo - Strategy 3

Here is the code for Steve Primo Strategy #1 - Setup Long and Short

- Please refer to his videos for triggers and management.

Share your views.


Uday C Santhakumar
Script de código aberto

Dentro do verdadeiro espírito TradingView, o autor deste script publicou ele como um script de código aberto, para que os traders possam compreender e checar ele. Um viva ao autor! Você pode usá-lo gratuitamente, mas a reutilização deste código em uma publicação é regida pelas Regras da Casa. Você pode favoritá-lo para usá-lo em um gráfico.

Aviso legal

As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.

Quer usar esse script no gráfico?
// Created by UCS Gears
// Steve Primo Strategy #3

study(shorttitle="SP-S#3", title="StevePrimo - Strategy #3", overlay=true, precision = 2)

basis = sma(close, 20)
dev = 0.382 * stdev(close, 20)
upper = basis + dev
lower = basis - dev
bs = sma(close, 50)

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

trendup = close > bs and close[1] > bs[1]
trenddn = close < bs and close[1] < bs[1]

plot (bs, linewidth = 3, color = black, title = "Trend - Long Term")
//plot (petd, linewidth = 1, color = blue, title = "Trend - Short Term")
plot (basis, linewidth = 1, color = purple, title = "Bollinger Mid Line")
p1 = plot (upper, linewidth = 1, color = purple, title = "Bollinger Upper Line")
p2 = plot (lower, linewidth = 1, color = purple, title = "Bollinger Lower Line")
fill (p1, p2, purple)

// Setup Long
SL = trendup and high < lower and high[1] > lower[1] ? 1 : na

// Setup Short
SS = trenddn and low > upper and low[1] < upper[1]? 1 : na
SC = SS ? orange : SL ? lime : na

plotshape(SS, style = shape.labeldown, color = SC, location=location.abovebar, text="SP #3 Short")

plotshape(SL, style = shape.labelup, color = SC, location=location.belowbar, text="SP #3 Long")