SuperTrend

3 respostas

Graham Ferguson

Assinante, bbp_participante, cliente, comunidade, sq-ultimate, 8 respostas.

Perfil da visita

5 meses atrás #288840

Hi,

I am trying (and failing) to build a template in AlgoWizard to mimic the open and close positions as per this indicator.

The indicator uses a simple ATR period and multiplier and a source of hl2.

 

Is there anyone who can help me construct a template to achieve this?

Anexos:
Você deve ser logado para ver os arquivos anexos.

0

Graham Ferguson

Assinante, bbp_participante, cliente, comunidade, sq-ultimate, 8 respostas.

Perfil da visita

5 meses atrás #288841

MT5 indicator file attached

0

Graham Ferguson

Assinante, bbp_participante, cliente, comunidade, sq-ultimate, 8 respostas.

Perfil da visita

5 meses atrás #288842

For some reason I cannot upload the indicator file here, this is a link to it on Google Drive: https://drive.google.com/file/d/19MxBxvAt3K5B21Ix3fNVpxDKZ97eQY6D/view?usp=sharing

0

Adam Cox

Assinante, bbp_participante, 1 resposta.

Perfil da visita

1 mês atrás #289900

I have found Supertrend Strategy that i’m using on my tradingview, and take automate trades.

You can check this code:

//@version=5
strategy(‘Supertrend Strategy – PineConnector’, overlay=true)

LicenseID = 601234567890 // 1. change to your PineConnector License ID (required)
riskvalue = input.int(1, ‘Risk Value’) // 2. Change the risk value (optional)

atrPeriod = input(10, ‘ATR Length’)
factor = input(3, ‘Factor’)

[supertrend, direction] = ta.supertrend(factor, atrPeriod)

bodyMiddle = plot((open + close) / 2, display=display.none)
upTrend = plot(direction < 0 ? supertrend : na, ‘Up Trend’, color=color.new(color.green, 0), style=plot.style_linebr)
downTrend = plot(direction < 0 ? na : supertrend, ‘Down Trend’, color=color.new(color.red, 0), style=plot.style_linebr)

fill(bodyMiddle, upTrend, color.new(color.green, 90), fillgaps=false)
fill(bodyMiddle, downTrend, color.new(color.red, 90), fillgaps=false)

if ta.change(direction) < 0
strategy.entry(‘Long’, strategy.long)
alert(str.tostring(LicenseID)+’,buy,’ + syminfo.ticker + ‘,risk=’ + str.tostring(riskvalue), alert.freq_once_per_bar_close)

if ta.change(direction) > 0
strategy.entry(‘Short’, strategy.short)
alert(str.tostring(LicenseID)+’,sell,’ + syminfo.ticker + ‘,risk=’ + str.tostring(riskvalue), alert.freq_once_per_bar_close)

plotshape(ta.change(direction) < 0, style=shape.labelup, location=location.belowbar, color=color.new(#046ff9, 0), size=size.large, text=’PineConnector \n Buy’, textcolor=color.new(color.white, 0))
plotshape(ta.change(direction) > 0, style=shape.labeldown, location=location.abovebar, color=color.new(#046ff9, 0), size=size.large, text=’PineConnector \n Sell’, textcolor=color.new(color.white, 0))

I have found this code from this site.

0

Visualizando 3 respostas - 1 até 3 (de um total de 3)