TradingView
sonnyparlin
Sep 2, 2021 8:24 PM

Rate of Change Strategy 

Cardano / TetherUSBinance

描述

This strategy calculates the rate of change over time to determine buy/sell points. This strategy is best run with 1 hour candles.

Configurable values:

  • SMA Fast (days)
  • SMA Slow (days)
  • SMA Reference (days)
  • ROC Low (%)
  • ROC High (%)
  • Order Stake (%)
  • Look back Candles

版本注释

Quite a few changes with this release...

  • IMPORTANT - default settings are for ADAUSDT on BINANCE_US with 1 hour candles
  • Use 1 hour candles with this strategy
  • Got rid of high offset, we're just going to use trailing stoploss and take profit to exit.
  • Added plots for everything
  • Added absolute stoploss
  • Added take profit
  • Added bullish outside candle reversal as a buy signal
  • Read the comments for details
  • Still need to make some variables accessible via the settings

版本注释

Lots of changes, biggest being the correct code for stops and trailing stops.

  • Removed candle signal
  • Changed percentage inputs to take whole numbers
  • Show all plots with a checkbox
  • Configured for ETH on BinanceUS with 30 min candles

版本注释

Reset some default values for ETH on BinanceUS 30m candles

版本注释

Updated to pinescript 5, best used with day candles.
评论
sonnyparlin
Attention: The built-in function 'strategy.exit()' only accepts ticks for the trailing stop-loss instead of accepting a price percentage, which would be way more reliable for backtesting. Therefore you cannot trust the backtests for strategies that use ticks for stops / trailing stops. Since TV won't allow me to delete a script, I guess I just have to leave this message here and hope you read it before using this strategy.
stramaz
It's interesting but it doesn't work on real life. I backtested with a bot and is a lot far form TV backtest results. Problably the main reason is the awful intra candle managing of TV, in particular the trailing stops, you can see that in a single candle the exit is always on top and it's not real. For example I can develop a 100% profitable strategy making intra candle position (open and exit in the same candle) ..and in real life is awful. The problem is the backtest system of TV that is unreliable
sonnyparlin
@stramaz, The built-in function 'strategy.exit()' only accepts ticks for the trailing stop-loss instead of accepting a price percentage, which would be way more reliable for backtesting. Therefore you cannot trust the backtests for strategies that use ticks for stops / trailing stops.
ostavme
is there no repainting?
dpanday
Which script is better?
sonnyparlin
@dpanday, I just updated the first one and it's pretty solid. I have it making me almost 700k backtesting ADA with a start of 10k. The problem with the first one now is that it will likely have to be customized for each pair you run it on. This one is nice because it's kind of a simple concept, but I have yet to implement both stoploss and trailing stoploss like I just finished doing in the sma offset strategy. Anyway, good luck.
更多