From 6776eb157162780a7447e1cbaafaccc33143125f Mon Sep 17 00:00:00 2001 From: x p k Date: Sun, 26 Jul 2020 14:48:16 +0800 Subject: [PATCH] NEW: initial commit --- tradingview/README.md | 2 +- tradingview/macd-rsi.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tradingview/README.md b/tradingview/README.md index f361a88..a55d06f 100644 --- a/tradingview/README.md +++ b/tradingview/README.md @@ -1,4 +1,4 @@ # Strategy for use with tradingview.com ## 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. diff --git a/tradingview/macd-rsi.txt b/tradingview/macd-rsi.txt index f4f8855..57f4ff9 100644 --- a/tradingview/macd-rsi.txt +++ b/tradingview/macd-rsi.txt @@ -25,7 +25,7 @@ cu = crossunder(vrsi, overBought) if (not na(vrsi)) if (cu) - strategy.entry("Rsi75", strategy.short, comment="Rsi75") + strategy.entry("RsiSE", strategy.short, comment="RsiSE") // strategy.close_all(comment = "RsiSE") //plot(strategy.equity, title="equity", color=color.red, linewidth=2, style=plot.style_areabr)