TradingView
Potaball
22 дек 2022 г., 03:32

Weird Renko Strat 

Bitcoin / TetherUSBinance

Описание

This strategy uses Renko, it generates a signal when there is a reversal in Renko. When using historical data, it provides a good entry and an okay exit. However, in a real-time environment, this strategy is subject to repaint and may produce a false signal.

As a result, the backtesting result should not be used as a metric to predict future results. It is highly recommended to forward-test the strategy before using it in real trading. I forward test it from 12/18/2022 to 12/21/2022 in paper trading, using the alert feature in Tradingview. I made 60 trades trading the BTCUSDT BINANCE 3 min with 26 as the param and under the condition that I use 20x margin, compounding my yield, and having 0 trading fee, a steady loss is generated: from $10 to $3.02.

This is quite interesting. As if I flip the signal from "Long" to "Short" and another way too, it will be a steady profit from $10 to $21.85. Hence, if I'm trying to anti-trade the real-time alert signal, the current "4 Days Result" will be good. Nevertheless, I still have to forward-test it for longer to see if it will fail eventually.

Dive into the setting of the strategy
- Margin is the leverage you use. 1 means 1x, 10 means 10x. It affects the backtest yield when you backtest
- Compound Yield button is for compound calculation, disable it to go back to normal backtesting
- Anti Strategy button is to do the opposite direction trade, when the original strat told you to "Long", you "Short" instead. Enable it to use the feature
- Param is the block size for the Renko chart
- Drawdown is just a visual tool for you in case you want to place a stop loss (represent by the semitransparent red area in the chart)
- From date Thru Date is to specify the backtest range of the strategy, This feature is turned off by default. It is controlled by the Max Backtest Timeframe which will be explain below
- Max Backtest Timeframe control the From date Thru Date function, disable it to enable the From Date Thru Date function

Param is the most important input in this strategy as it directly affects performance. It is highly recommended to backtest nearly all the possible parameters before deploying it in real trading. Some factors should be considered:
- Price of the asset (like an asset of 1 USD vs an asset of 10000 USD required different param)
- Timeframe (1-minute param is different than 1-month param)
I believe this is caused by the volatility of the selected timeframe since different timeframe has different volatility. Param should be fine-tuned before usage.

Here is the param I'm using:
BTCUSDT BINANCE 3min: 26
BTCUSDT BINANCE 5min: 28
BTCUSDT BINANCE 1day: 15

Background of the strategy:
- The strategy starts with $10 at the start of backtesting (customizable in setting)
- The trading fee is set to 0.00% which is not common for most of the popular exchanges (customizable in setting)
- The contract size is not a fixed amount, but it uses your balance to buy it at the open price. If you are using the compound mode, your balance will be your current total balance. If you are using the non-compound mode, it will just use the $10 you start with unless you change the amount you start with. If you are using a margin higher than 1, it will calculate the corresponding contract size properly based on your margin. (Only these options are allowed, you are not able to change them without changing the code)
Комментарии
beomjink92
fake
Potaball
@beomjink92, which part do you mean? As mentioned above, the script is subject to repaint. So, the backtesting result is unreliable.
Potaball
Here is an update of the strategy after I forward-tested it for 10 days (18/12/2022 – 27/12/2022). I applied this strategy on the “BINANCE: BTCUSDT” ticker, “Candles” chart, and “3 minutes” timeframe. For the parameter, I’m still using the 20x leverage and 26 param. Besides that, the testing was carried out under the hypothetical condition:
• 0 trading fee
• 0 slippage
• Start with 10 USD
• Compound the yield of each trade (use all the capital and max leverage (20x) to enter a new position)
• Use Tradingview alert as the signal source (the emitted alerts are not affected by the repainting)
• Counter trade all the emitted signals (Open “short” when the strategy alert signal “long” and vice versa)
• No Stop loss & Take Profit (Enter and exit strictly following the alert signal)

At the end of the testing (28/12/2022), I have a total capital of 28.914 USD which consist of 10 USD initial capital and 18.914 USD profit. That’s 53 trades in total (106 if double counts as entering a position mean closing the existing position and opening a new one in this context). The Day over Day ROI is the following: 113.74%, 108.22%, 119.40%, 148.68%, 104.60%, 103.11%, 107.50%, 116.05%, 100.51%, 97.85%.

Within the testing period, no observable catastrophic failure occurs. However, the max drawdown of the strategy as I tested it so far is 36.41%. While the highest drawdown for a single trade is 54.64%. Bear in mind that this is not constant and may change depending on the size of the data from the testing.

To sum up, the information from the forward testing only guarantees the strategy works fine for BINANCE:BTCUSDT within the tested range, but does not include the future. As I mentioned before, I strongly recommend anyone to forward-test it before applying it to real trading.
myncrypto
@Potaball, Commission kills this unfortunately :(
Potaball
@myncrypto, according to the data of the backtest range (18/12/2022 - 27/12/2022) with 20x leverage, the average profit of each trade is about 2.52%. Without using leverage, the actual profit will be much less. A high commission indeed will make this strategy unprofitable
Potaball
@Potaball, here is another update. The bitcoin pump in the last week causing significant loss if the parameter and the condition remain the same. As of 16/1/2023, the max drawdown at about 99.40%. The balance is only 0.46 left.
Ещё