TradingView
cryptrololo
20 juil. 2019 22:24

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

Bitcoin / EuroKraken

Description

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,
Commentaires
cryptrololo
strategy.entry("Sell", strategy.short, when = goShort())
strategy.close("Sell", when = killShort() and close < short_price)
mohammadrezakadkhodaii785
0k
vsov
You could try RSX, smoother and faster version of RSI built over JMA. RSX responses to price actions much faster, so results should be much better than using fast JMA over slow RSI (rma doesn't help a lot in this case)
cryptrololo
@vsov, Hi, thanks a lot for this advice i will have a look at RSX !!
vsov
@cryptrololo, your idea, though, makes sense if being used with much faster and sharper RSI (like Ehler's Ideal RSI). I took a liberty to make the script tradingview.com/script/D64o8Yys-Adaptive-DC-of-Ideal-RSI/ which gives some interesting signals. But, as you can see, JMA signal doesn't significantly differ from central line of Donchian channel
cryptrololo
@vsov, I compared the following crossing strategies; JMA(7,50,IRSI), JMA(7,50,RSX(14)), EMA(9,RSI(14)) on two cryptos; BTC (mainly bullish) and XML (mainly in a trading range) from the 1st Jan 2019. JMA(IRSI) crossing IRSI provides good profitable percents, as JMA(RSX) crossing RSX (on a daily timeframe).

cryptrololo
@vsov, In a bullish scenario (BTC), the best i had is with the JMA(7,50,RSX(14)) crossing each others on a daily timeframe. For 1K capital i got a minimal drawdown of 148 for a total net profit of 1010.52.

I'm going to try your script 'Adaptive DC of Ideal RSI'.
Plus