cryptrololo

Strategy JMA(7,50,RSI) crossing RSI(14,close)

Hello, i would like to submit a script dealing with Jurik Moving Average Crossing RSI . Also to avoid false positive, i made a test with long/short positions and entry/closing prices but unfortunately it's not working. I may be too noob to Pine.

If you have some ideas to refactor / improve / make this section works:
// ======= DEBUGGGGGGGG ============
long_price = 0.0
short_price = 0.0

if(startTime and endTime)
if(goLong())
long_price := close
strategy.entry("Buy", strategy.long, when = goLong())
strategy.close("Buy", when = killLong() and close > long_price)

// Shorting if using
goShort() => killLong()
killShort() => goLong()

if(startTime and endTime)
if(goShort())
short_price := close
strategy.entry("Sell", strategy.short, when = goShort() and close < short_price)
strategy.close("Sell", when = killShort())
// =========================

Thanks,

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?