NEW: initial commit
This commit is contained in:
parent
c6dcb26774
commit
6776eb1571
@ -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.
|
||||||
|
@ -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)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user