Strategy Tester EMA-SMA-RSI-MACD by fikira
By fikira
Performance Metrics
- Author: fikira
- Symbol: COINBASE:BTCUSD
- Timeframe: 15 minutes
- Net P&L: +301.90 USD (+301.43%)
- Win Rate: 46.3%
- Profit Factor: 2.272
- Max Drawdown: 56.03 USD (16.13%)
- Total Trades: 134
- Sharpe Ratio: 1.106
Description
May 8, 2020On Tradingview I never saw a custom adjustable strategy script yet, so this is it,you can change different things and see if you'll get a good strategy or notSettings:First choose the source, you can choose out of:close, open, high, low, ohlc4, hlc3, hl2Then choose you strategy: Long & Short, Long only or Short onlyNext, choose your entry "Buy/Long" (which is the "close Short position" when "Short"):- (E)MA 1 > (E)MA 2 (Each can be made ema or sma)- close above (E)MA 1- RSI strategy - macd > signal - macd > 0- signal > 0Then choose your RSI values if needed (for example you want a trigger when EMA 1 > SMA 2but only if RSI > 60, then change "IF RSI >" from 0 to 60Next you can choose an extra argumentand even a second argument with Higher Time Frame settingsUnder this you can change your (E)MA values as desired (HTF values, MACD and RSI length can be found lower)All the same with the exit/close (or if "Short", this is your entry)Again, change everything as you wishThen comes the RSI length setting, MACD settings and HTF settings, followed by SL/TP settings(you also can enable/disable SL/TP), and TIME settings (for example you want to know the profit only from this year)Alerts are provided in next scriptHave fun!May 11, 2020Release NotesUpdated the RSI argumentsMay 16, 2020Release NotesImproved SL/TP, thank you finetime1000 for spotting !Jul 2, 2020Release NotesAdded debuggingAlso added symbols when it triggers (at close),the strategy order will then happen at open (next bar),just to help seeing how it worksOct 5, 2020Release NotesAdded SELL a condition, if the option "BUY = false" is chosen, it will SELL whenever 1 of more BUY conditions isn't valid anymoreDec 26, 2020Release NotesSource is now more adjustable, when combined with a second, third,... script, you can use the source of that second,... script in the Stat-testDec 27, 2020Release NotesAdded as extra argument 'hist > hist[1]' (when 'hist' 0).When you want this option solely as strat, you could for example choose (BUY & SELL):'RSI' strategy (values 0 & 100, so it never will be triggered), and 'extra argument' -> hist... Feb 16, 2021Release NotesSynchronized with recent pine changes Feb 16, 2021Release Notesupdated