NEW: initial commit

This commit is contained in:
xpk 2020-07-26 14:48:16 +08:00
parent c6dcb26774
commit 6776eb1571
Signed by: xpk
GPG Key ID: CD4FF6793F09AB86
2 changed files with 2 additions and 2 deletions

View File

@ -1,4 +1,4 @@
# Strategy for use with tradingview.com # Strategy for use with tradingview.com
## macd-rsi.txt ## macd-rsi.txt
Buy when MACD crossover upwards. Sell when RSI exceeds 75. Simple strategy for use with stocks with a long-term uptrend. Long when MACD crossover upwards. Short when RSI exceeds 75. Simple strategy for use with stocks with a long-term uptrend. I'm still working on the code to not short but only close a portion of previous positions. Can't get strategy.close or strategy.close_all to work.

View File

@ -25,7 +25,7 @@ cu = crossunder(vrsi, overBought)
if (not na(vrsi)) if (not na(vrsi))
if (cu) if (cu)
strategy.entry("Rsi75", strategy.short, comment="Rsi75") strategy.entry("RsiSE", strategy.short, comment="RsiSE")
// strategy.close_all(comment = "RsiSE") // strategy.close_all(comment = "RsiSE")
//plot(strategy.equity, title="equity", color=color.red, linewidth=2, style=plot.style_areabr) //plot(strategy.equity, title="equity", color=color.red, linewidth=2, style=plot.style_areabr)