Why NostalgiaForInfinity shouldn’t be used for live trading

Credit to those (who won’t be named for some reasons) who helped me writing this article

Let’s first discuss a few issues with the way that the strategy performance is overinflated due to gaming backtests.

Small static list used for backtest

Read this article for more detail

Blacklisting coins with problematic trades without providing backtest evidence

Blacklisting coins after a huge red trade happened won’t ensure that a similar huge red trade won’t occur in the future with a different coin. Every day, new coins are listed, particularly on less strict exchanges. The best course of action is to block certain coins from live trade, but you also have to improve the strategy to make sure that the backtesting of the new version can handle those problematic coins. Although it’s not a certainty, at least your strategy can now deal with previously identified undesirable trades.

No hard stoploss because it will bounce

This is a risky way of thinking, especially in the cryptocurrency world where any coin—aside from Bitcoin—can fall into a deep hole. Recall LUNA? Or perhaps those metaverse coins, like MBOX. Not always will they bounce. It is exceedingly risky to play with a very loose stop loss and to move it up or down arbitrarily. At some points, the stop loss will be changed only few days after the last change. Have a fixed stop loss or a loose stop loss with several exit plans for when the indicators start screaming “DANGER!”. Having none is simply poor risk management. A single loss might essentially erase weeks or months’ worth of profits.

“Sophisticated” strategy

Truthfully, it would take a lot of time to read and analyze each and every line in the strategy file, which is what everyone must do before using an unfamiliar strategy. You must fully understand how the strategy will operate. Sadly, not many people have the patience to wait before investing their money into the real world.

Overfitted fixes

Consider this fix, changed from 0.022 to 0.023. Without any logical reasoning, that tiny adjustment to a parameter was made to make the backtest appear flawless. Or this fix, which made 0.990 into 0.995. This? This? Other than the fact that the adjustments would lead to favorable backtest results, I hope there are some logical scientific justifications for the adjustments.

Personally, I recommend keeping with a single number, like 0.95. Meanwhile, if you still want to change the number, it’s best to use appropriate increments; for instance, if the range is between 0 and 1, a 0.005 increase can be considered overfitting. The ideal increase to prevent overfitting is 0.05. But 0.005 would be OK if the range was 0 to 0.1. The best course of action is to add additional logics rather than alter the value of the parameters.

The updates happen too often

Rarely will a version be run over a prolonged period of time to evaluate its actual performance and compare it with the backtest. You might even get 6-7 updates a day on occasion. Because you get a newer version a few hours later, it’s difficult to judge whether the previous version is indeed poor and whether the new version is better. All evaluations are based on backtest results, but as I’ll discuss later, those results are questionable.

The only thing these regular updates have done is foster the FOMO attitude. It’s a common misconception among users that newer is always better. There is no solid evidence to support it. It’s also difficult to determine which components genuinely contribute to the increase or loss in performance in the most recent version due to tiny changes in each version.

Now to the strategy itself. Some issues with the strategy that I found are

Custom exit and partial entry/exit that trick backtest

To learn why and how to prevent traps in custom exits, click the link above. By having a lengthy if-else logic in the exit logics, you almost always get different results compared to backtest since it’s hard to get the same entry rate as backtest. You would even have different results on two bots running concurrently. The partial entry/exit problem have the same issue as the custom exit trap mentioned above.

Inconsistent startup_candle_count

It’s odd because startup_candle_count is defined as 800 yet these are written few lines below

# OKX, Kraken provides a lower number of candle data per API call
if self.config["exchange"]["name"] in ["okx", "okex"]:
    self.startup_candle_count = 480
elif self.config["exchange"]["name"] in ["kraken"]:
    self.startup_candle_count = 710
elif self.config["exchange"]["name"] in ["bybit"]:
    self.startup_candle_count = 199

Startup candle is a parameter that depends on indicators you use rather than the exchange you use, as it will have an impact on a number of indicators if the startup count is recklessly decreased. A brief look at the populate indicators reveals a handful that will break if this method is used on Bybit.

dataframe['ema_200'] = ta.EMA(dataframe, timeperiod=200)
dataframe['sma_200'] = ta.SMA(dataframe, timeperiod=200)
dataframe['r_480'] = williams_r(dataframe, period=480)
dataframe['ewo_50_200'] = ewo(dataframe, 50, 200)

The phrase “trash input, trash output” was often used by my lecturer. Don’t expect the indicators to provide you with trustworthy outcomes if you provide them with inaccurate data. Don’t support the exchange if you believe it is incapable of handling such candle requests. Being safe is preferable to fighting with low-quality weapons.

Overcomplicated/overfitted logics

Not sure if anyone can really understand the logic behind buy #1. Let’s go through its logic together.

NFIX3 entry logic

# Condition #1 - Long mode bull. Uptrend. if index == 1: # Protections item_buy_logic.append(dataframe['btc_pct_close_max_24_5m'] < 0.03) item_buy_logic.append(dataframe['btc_pct_close_max_72_5m'] < 0.03) item_buy_logic.append(dataframe['close_max_12'] < (dataframe['close'] * 1.2)) item_buy_logic.append(dataframe['close_max_24'] < (dataframe['close'] * 1.24)) item_buy_logic.append(dataframe['close_max_48'] < (dataframe['close'] * 1.3)) item_buy_logic.append(dataframe['high_max_24_1h'] < (dataframe['close'] * 1.5)) item_buy_logic.append(dataframe['high_max_24_4h'] < (dataframe['close'] * 1.75)) item_buy_logic.append(dataframe['hl_pct_change_6_1h'] < 0.4) item_buy_logic.append(dataframe['hl_pct_change_12_1h'] < 0.5) item_buy_logic.append(dataframe['hl_pct_change_24_1h'] < 0.75) item_buy_logic.append(dataframe['hl_pct_change_48_1h'] < 0.9) item_buy_logic.append(dataframe['num_empty_288'] < allowed_empty_candles) item_buy_logic.append(dataframe['cti_20_1h'] < 0.9) item_buy_logic.append(dataframe['rsi_14_1h'] < 85.0) item_buy_logic.append(dataframe['cti_20_4h'] < 0.9) item_buy_logic.append(dataframe['rsi_14_4h'] < 85.0) item_buy_logic.append(dataframe['cti_20_1d'] < 0.9) item_buy_logic.append(dataframe['rsi_14_1d'] < 85.0) item_buy_logic.append(dataframe['r_14_1h'] < -25.0) item_buy_logic.append(dataframe['r_14_4h'] < -25.0) item_buy_logic.append((dataframe['not_downtrend_1h']) | (dataframe['not_downtrend_4h']) | (dataframe['cti_20_15m'] < -0.8) | (dataframe['cti_20_1h'] (dataframe['open'] * 0.06))) item_buy_logic.append((dataframe['not_downtrend_15m']) | (dataframe['cti_20_15m'] < -0.5) | (dataframe['cti_20_1h'] < -0.5) | (dataframe['ema_200_dec_24_4h'] == False) | (dataframe['ema_200_dec_4_1d'] == False) | (dataframe['close_max_24'] < (dataframe['close'] * 1.2))) item_buy_logic.append((dataframe['not_downtrend_1h']) | (dataframe['not_downtrend_4h']) | (dataframe['cti_20_1h'] < -0.5) | (dataframe['rsi_14_1h'] < 30.0) | (dataframe['cti_20_4h'] < -0.5) | (dataframe['rsi_14_4h'] (dataframe['open'] * 0.04))) item_buy_logic.append((dataframe['cti_20_15m'] < -0.9) | (dataframe['cti_20_1h'] < -0.0) | (dataframe['rsi_14_1h'] < 30.0) | (dataframe['rsi_14_4h'] (dataframe['open'] * 0.04))) item_buy_logic.append((dataframe['not_downtrend_15m']) | (dataframe['not_downtrend_1h']) | (dataframe['cti_20_15m'] < -0.8) | (dataframe['cti_20_1h'] (dataframe['open'] * 0.04))) item_buy_logic.append((dataframe['not_downtrend_15m']) | (dataframe['cti_20_15m'] < -0.8) | (dataframe['cti_20_1h'] < -0.0) | (dataframe['cti_20_4h'] (dataframe['open'] * 0.04))) item_buy_logic.append((dataframe['not_downtrend_15m']) | (dataframe['cti_20_1h'] < 0.5) | (dataframe['rsi_14_1h'] < 30.0) | (dataframe['cti_20_4h'] < -0.0) | (dataframe['rsi_14_4h'] (dataframe['open'] * 0.04))) item_buy_logic.append((dataframe['not_downtrend_15m']) | (dataframe['not_downtrend_1h']) | (dataframe['cti_20_1h'] < -0.0) | (dataframe['cti_20_4h'] < -0.8) | (dataframe['cti_20_1d'] (dataframe['open'] * 0.04))) item_buy_logic.append((dataframe['cti_20_15m'] < -0.75) | (dataframe['cti_20_1h'] < -0.5) | (dataframe['rsi_14_1h'] < 30.0) | (dataframe['cti_20_4h'] < 0.5) | (dataframe['rsi_14_4h'] (dataframe['open'] * 0.04))) item_buy_logic.append((dataframe['not_downtrend_15m']) | (dataframe['not_downtrend_1h']) | (dataframe['cti_20_15m'] < -0.8) | (dataframe['cti_20_1h'] < -0.0) | (dataframe['cti_20_4h'] 25.0) | (dataframe['cti_20_1h'] < -0.5) | (dataframe['rsi_14_1h'] < 40.0) | (dataframe['cti_20_4h'] < -0.5) | (dataframe['rsi_14_4h'] < 40.0) | (dataframe['cti_20_1d'] (dataframe['open'] * 0.03))) item_buy_logic.append((dataframe['not_downtrend_15m']) | (dataframe['not_downtrend_4h']) | (dataframe['cti_20_15m'] 25.0) | (dataframe['cti_20_4h'] < -0.0) | (dataframe['ema_200_dec_24_4h'] == False) | (dataframe['ema_200_dec_4_1d'] == False)) item_buy_logic.append((dataframe['not_downtrend_15m']) | (dataframe['cti_20_15m'] 25.0) | (dataframe['cti_20_1h'] < 0.5) | (dataframe['cti_20_4h'] < 0.5) | (dataframe['cti_20_1d'] (dataframe['open'] * 0.03))) item_buy_logic.append((dataframe['not_downtrend_1h']) | (dataframe['cti_20_15m'] 25.0) | (dataframe['cti_20_1h'] < -0.8) | (dataframe['cti_20_4h'] < -0.8) | (dataframe['cti_20_1d'] (dataframe['open'] * 0.06))) item_buy_logic.append((dataframe['not_downtrend_1h']) | (dataframe['rsi_14_15m'] < 25.0) | (dataframe['cti_20_1h'] < -0.8) | (dataframe['rsi_14_1h'] < 30.0) | (dataframe['cti_20_4h'] < 0.5) | (dataframe['rsi_14_4h'] < 30.0) | (dataframe['cti_20_1d'] (dataframe['open'] * 0.03))) item_buy_logic.append((dataframe['cti_20_15m'] 25.0) | (dataframe['cti_20_1h'] < -0.0) | (dataframe['cti_20_4h'] < 0.5) | (dataframe['cti_20_1d'] < -0.5) | (dataframe['rsi_14_1d'] < 70.0) | (dataframe['hl_pct_change_48_1h'] (dataframe['open'] * 0.03))) item_buy_logic.append((dataframe['not_downtrend_15m']) | (dataframe['cti_20_15m'] 25.0) | (dataframe['cti_20_1h'] < -0.0) | (dataframe['rsi_14_4h'] < 30.0) | (dataframe['cti_20_1d'] (dataframe['open'] * 0.07))) item_buy_logic.append((dataframe['not_downtrend_1h']) | (dataframe['cti_20_15m'] 25.0) | (dataframe['cti_20_1h'] < -0.8) | (dataframe['cti_20_4h'] < -0.0) | (dataframe['cti_20_1d'] (dataframe['open'] * 0.04))) item_buy_logic.append((dataframe['not_downtrend_1h']) | (dataframe['cti_20_15m'] 25.0) | (dataframe['cti_20_1h'] < -0.8) | (dataframe['cti_20_4h'] < 0.5) | (dataframe['cti_20_1d'] (dataframe['open'] * 0.03))) item_buy_logic.append((dataframe['not_downtrend_15m']) | (dataframe['not_downtrend_1h']) | (dataframe['not_downtrend_4h']) | (dataframe['cti_20_15m'] 25.0) | (dataframe['cti_20_1d'] (dataframe['open'] * 0.03))) item_buy_logic.append((dataframe['cti_20_15m'] 10.0) | (dataframe['cti_20_1h'] < 0.5) | (dataframe['cti_20_4h'] < 0.5) | (dataframe['cti_20_1d'] (dataframe['open'] * 0.03))) item_buy_logic.append((dataframe['cti_20_15m'] 10.0) | (dataframe['cti_20_1h'] < 0.5) | (dataframe['cti_20_4h'] < -0.0) | (dataframe['cti_20_1d'] (dataframe['open'] * 0.03))) item_buy_logic.append((dataframe['cti_20_15m'] 10.0) | (dataframe['cti_20_1h'] 25.0) | (dataframe['cti_20_4h'] < -0.0) | (dataframe['cti_20_1d'] (dataframe['open'] * 0.03))) item_buy_logic.append((dataframe['cti_20_15m'] < -0.9) | (dataframe['rsi_14_15m'] < 30.0) | (dataframe['cti_20_1h'] < -0.0) | (dataframe['cti_20_4h'] < -0.5) | (dataframe['cti_20_1d'] (dataframe['open'] * 0.03))) item_buy_logic.append((dataframe['not_downtrend_15m']) | (dataframe['cti_20_15m'] 20.0) | (dataframe['cti_20_1h'] < -0.5) | (dataframe['cti_20_1d'] (dataframe['open'] * 0.04))) item_buy_logic.append((dataframe['not_downtrend_1h']) | (dataframe['not_downtrend_4h']) | (dataframe['cti_20_15m'] < -0.9) | (dataframe['rsi_14_15m'] < 20.0) | (dataframe['cti_20_1d'] (dataframe['open'] * 0.04))) item_buy_logic.append((dataframe['cti_20_15m'] 10.0) | (dataframe['cti_20_1h'] < -0.5) | (dataframe['cti_20_4h'] 10.0) | (dataframe['cti_20_1h'] < -0.5) | (dataframe['cti_20_4h'] 20.0) | (dataframe['cti_20_4h'] < 0.5) | (dataframe['cti_20_1d'] (dataframe['open'] * 0.03))) item_buy_logic.append((dataframe['cti_20_15m'] 10.0) | (dataframe['cti_20_1h'] < 0.5) | (dataframe['cti_20_4h'] < -0.0) | (dataframe['cti_20_1d'] (dataframe['open'] * 0.03))) item_buy_logic.append((dataframe['cti_20_15m'] 30.0) | (dataframe['rsi_14_15m'] < 30.0) | (dataframe['cti_20_1h'] < -0.8) | (dataframe['cti_20_4h'] < 0.5) | (dataframe['cti_20_1d'] (dataframe['open'] * 0.05))) item_buy_logic.append((dataframe['cti_20_15m'] 25.0) | (dataframe['rsi_14_15m'] < 30.0) | (dataframe['cti_20_4h'] < 0.5) | (dataframe['cti_20_1d'] < -0.5) | (dataframe['high_max_48_1h'] (dataframe['open'] * 0.03))) item_buy_logic.append((dataframe['not_downtrend_1h']) | (dataframe['cti_20_15m'] 25.0) | (dataframe['cti_20_4h'] 25.0) | (dataframe['rsi_14_15m'] < 30.0) | (dataframe['cti_20_1h'] < 0.5) | (dataframe['cti_20_4h'] 20.0) | (dataframe['rsi_14_15m'] < 30.0) | (dataframe['cti_20_1h'] < -0.0) | (dataframe['cti_20_4h'] 25.0) | (dataframe['rsi_14_15m'] < 30.0) | (dataframe['cti_20_1h'] < -0.8) | (dataframe['cti_20_4h'] 20.0) | (dataframe['cti_20_1h'] < -0.5) | (dataframe['cti_20_1d'] (dataframe['open'] * 0.03))) item_buy_logic.append((dataframe['rsi_14_15m'] < 30.0) | (dataframe['cti_20_1h'] 20.0) | (dataframe['cti_20_1h'] < -0.5) | (dataframe['cti_20_4h'] < 0.5) | (dataframe['cti_20_1d'] (dataframe['open'] * 0.03))) item_buy_logic.append((dataframe['rsi_14_15m'] < 30.0) | (dataframe['cti_20_1h'] < -0.0) | (dataframe['cti_20_4h'] < -0.0) | (dataframe['cti_20_1d'] (dataframe['open'] * 0.04))) item_buy_logic.append((dataframe['cti_20_15m'] < -0.9) | (dataframe['rsi_14_15m'] < 30.0) | (dataframe['cti_20_1h'] < 0.5) | (dataframe['cti_20_4h'] < 0.5) | (dataframe['cti_20_1d'] < -0.0) | (dataframe['rsi_14_1d'] (dataframe['open'] * 0.05))) item_buy_logic.append((dataframe['cti_20_15m'] 30.0) | (dataframe['rsi_14_15m'] < 30.0) | (dataframe['cti_20_1h'] < 0.5) | (dataframe['cti_20_4h'] < -0.0) | (dataframe['cti_20_1d'] (dataframe['open'] * 0.03))) item_buy_logic.append((dataframe['not_downtrend_1h']) | (dataframe['cti_20_15m'] < -0.9) | (dataframe['cti_20_1h'] < -0.75) | (dataframe['cti_20_4h'] < -0.5) | (dataframe['cti_20_1d'] (dataframe['open'] * 0.03))) item_buy_logic.append((dataframe['not_downtrend_4h']) | (dataframe['rsi_14_15m'] < 20.0) | (dataframe['cti_20_1h'] < -0.0) | (dataframe['cti_20_4h'] < -0.8) | (dataframe['cti_20_1d'] < 0.5) | (dataframe['high_max_48_1h'] (dataframe['open'] * 0.05))) item_buy_logic.append((dataframe['cti_20_15m'] < -0.9) | (dataframe['rsi_14_15m'] < 30.0) | (dataframe['cti_20_1h'] < -0.0) | (dataframe['cti_20_4h'] < 0.5) | (dataframe['rsi_14_4h'] < 70.0) | (dataframe['cti_20_1d'] (dataframe['open'] * 0.05))) item_buy_logic.append((dataframe['not_downtrend_15m']) | (dataframe['not_downtrend_1h']) | (dataframe['cti_20_15m'] 20.0) | (dataframe['rsi_14_15m'] < 30.0) | (dataframe['cti_20_1h'] < -0.0) | (dataframe['cti_20_4h'] < 0.5) | (dataframe['cti_20_1d'] (dataframe['open'] * 0.04))) item_buy_logic.append((dataframe['not_downtrend_15m']) | (dataframe['cti_20_15m'] 30.0) | (dataframe['rsi_14_15m'] < 20.0) | (dataframe['cti_20_1h'] 25.0) | (dataframe['cti_20_4h'] < -0.8) | (dataframe['cti_20_1d'] (dataframe['open'] * 0.08))) item_buy_logic.append((dataframe['cti_20_15m'] 30.0) | (dataframe['rsi_14_15m'] < 30.0) | (dataframe['cti_20_1h'] < -0.0) | (dataframe['cti_20_4h'] < 0.5) | (dataframe['cti_20_1d'] (dataframe['open'] * 0.03))) item_buy_logic.append(((dataframe['not_downtrend_1h']) & (dataframe['not_downtrend_4h'])) | (dataframe['high_max_24_4h'] (dataframe['open'] * 0.03))) item_buy_logic.append((dataframe['not_downtrend_15m']) | (dataframe['not_downtrend_1h']) | (dataframe['cti_20_15m'] 20.0) | (dataframe['rsi_14_15m'] < 20.0) | (dataframe['cti_20_1h'] < -0.5) | (dataframe['cti_20_4h'] (dataframe['open'] * 0.03))) item_buy_logic.append((dataframe['cti_20_15m'] < -0.9) | (dataframe['rsi_14_15m'] < 30.0) | (dataframe['cti_20_1h'] < -0.0) | (dataframe['cti_20_4h'] < 0.5) | (dataframe['ema_200_dec_48_1h'] == False) | (dataframe['close_max_24'] (dataframe['open'] * 0.03))) item_buy_logic.append((dataframe['change_pct_4h'].shift(48) -0.06) | (dataframe['cti_20_1h'] < 0.5) | (dataframe['cti_20_4h'] < 0.5) | (dataframe['rsi_14_4h'].shift(48) < 80.0)) item_buy_logic.append((dataframe['not_downtrend_15m']) | (dataframe['not_downtrend_1h']) | (dataframe['cti_20_15m'] 10.0) | (dataframe['cti_20_4h'] < -0.5) | (dataframe['cti_20_1d'] < -0.8) | (dataframe['ema_200_dec_48_1h'] == False) | (dataframe['close_max_24'] (dataframe['open'] * 0.03))) item_buy_logic.append((dataframe['not_downtrend_1h']) | (dataframe['cti_20_15m'] 25.0) | (dataframe['cti_20_4h'] < -0.5) | (dataframe['cti_20_1d'] < -0.8) | (dataframe['ema_200_dec_48_1h'] == False) | (dataframe['close_max_24'] (dataframe['open'] * 0.06))) item_buy_logic.append((dataframe['change_pct_1d'] 25.0) | (dataframe['cti_20_4h'] < 0.5) | (dataframe['ema_200_dec_4_1d'] == False)) item_buy_logic.append((dataframe['change_pct_4h'].shift(48) < 0.1) | (dataframe['top_wick_pct_4h'].shift(48) < 0.1) | (dataframe['cti_20_1h'] < 0.5) | (dataframe['cti_20_4h'] < -0.5) | (dataframe['ema_200_dec_4_1d'] == False)) item_buy_logic.append((dataframe['change_pct_4h'].shift(48) -0.02) | (dataframe['cti_20_1h'] < 0.5) | (dataframe['cti_20_4h'] < 0.5) | (dataframe['rsi_14_4h'].shift(48) < 70.0)) item_buy_logic.append((dataframe['top_wick_pct_1h'] < (abs(dataframe['change_pct_1h']) * 6.0)) | (dataframe['cti_20_1h'] < 0.5)) item_buy_logic.append((dataframe['change_pct_4h'] < 0.26) | (dataframe['top_wick_pct_4h'] < 0.26) | (dataframe['rsi_14_4h'] < 70.0)) item_buy_logic.append((dataframe['change_pct_4h'] < 0.26) | (dataframe['cti_20_1h'] < 0.5) | (dataframe['cti_20_1d'] < 0.5) | (dataframe['rsi_14_4h'] < 70.0)) item_buy_logic.append((dataframe['change_pct_4h'] < 0.16) | (dataframe['top_wick_pct_4h'] < 0.08) | (dataframe['cti_20_1h'] < 0.5) | (dataframe['rsi_14_1h'] < 70.0)) item_buy_logic.append((dataframe['change_pct_4h'] < 0.16) | (dataframe['top_wick_pct_4h'] < 0.08) | (dataframe['cti_20_1h'] < 0.5) | (dataframe['ema_200_dec_4_1d'] == False) | (dataframe['close_max_24'] < (dataframe['close'] * 1.12))) item_buy_logic.append((dataframe['cti_20_1h'] < 0.5) | (dataframe['ema_200_dec_24_4h'] == False) | (dataframe['ema_200_dec_4_1d'] == False) | (dataframe['high_max_24_1h'] < (dataframe['close'] * 1.3)) | (dataframe['hl_pct_change_24_1h'] -0.06) | (dataframe['not_downtrend_1h']) | (dataframe['cti_20_1d'] 25.0) | (dataframe['cti_20_4h'] -0.06) | (dataframe['top_wick_pct_1d'] < 0.06) | (dataframe['cti_20_1h'] < 0.5) | (dataframe['rsi_14_1h'] -0.01) | (dataframe['cti_20_1d'] 10.0) | (dataframe['cti_20_1d'] 10.0) | (dataframe['cti_20_4h'] < 0.5)) item_buy_logic.append((dataframe['change_pct_1d'] < 0.06) | (dataframe['top_wick_pct_1d'] < 0.06) | (dataframe['cti_20_1h'] < -0.5) | (dataframe['rsi_14_1h'] < 40.0) | (dataframe['cti_20_4h'] (dataframe['open'] / 100)) item_buy_logic.append(dataframe['close'] < (dataframe['bb20_2_low'] * 0.999))

This entry’s logic is somewhat lengthy. According to my experience, combining all those lines into a single logic is risky because it would be difficult to determine which part triggered the bad entry and needed to be adjusted. In order to make it simpler to debug, optimize, and fix it in the future, I recommend that it be divided into manageable chunks and have their own entry tags. Same issue found on the exit logics, for example

if 0.01 > current_profit >= 0.001:
    if (last_candle['rsi_14'] < 20.0):
        return True, f'exit_{mode_name}_o_0'
elif 0.02 > current_profit >= 0.01:
    if (last_candle['rsi_14'] < 28.0):
        return True, f'exit_{mode_name}_o_1'
elif 0.03 > current_profit >= 0.02:
    if (last_candle['rsi_14'] < 30.0):
        return True, f'exit_{mode_name}_o_2'
elif 0.04 > current_profit >= 0.03:
    if (last_candle['rsi_14'] < 32.0):
        return True, f'exit_{mode_name}_o_3'
elif 0.05 > current_profit >= 0.04:
    if (last_candle['rsi_14'] < 34.0):
        return True, f'exit_{mode_name}_o_4'
elif 0.06 > current_profit >= 0.05:
    if (last_candle['rsi_14'] < 36.0):
        return True, f'exit_{mode_name}_o_5'
elif 0.07 > current_profit >= 0.06:
    if (last_candle['rsi_14'] < 38.0):
        return True, f'exit_{mode_name}_o_6'
elif 0.08 > current_profit >= 0.07:
    if (last_candle['rsi_14'] < 40.0):
        return True, f'exit_{mode_name}_o_7'
elif 0.09 > current_profit >= 0.08:
    if (last_candle['rsi_14'] < 42.0):
        return True, f'exit_{mode_name}_o_8'
elif 0.1 > current_profit >= 0.09:
    if (last_candle['rsi_14'] < 44.0):
        return True, f'exit_{mode_name}_o_9'
elif 0.12 > current_profit >= 0.1:
    if (last_candle['rsi_14'] < 46.0):
        return True, f'exit_{mode_name}_o_10'
elif 0.2 > current_profit >= 0.12:
    if (last_candle['rsi_14'] < 44.0):
        return True, f'exit_{mode_name}_o_11'
elif current_profit >= 0.2:
    if (last_candle['rsi_14'] < 42.0):
        return True, f'exit_{mode_name}_o_12'

Questions showed in my head when I read these lines

  • Why doesn’t the RSI limit increase from o_10 to o_11 and o_12?
  • Why is it increased by step of 2?
  • Why is the RSI limit increase from o_0 to o_1 8 rather than 2?
  • When the last candle indicates that the pair is in an oversold region, do you even want to exit?

High leverage setting (5x)

Since the hard stoploss (at the time this article was written) has been set at 30%, actual move of 6% would be sufficient to trigger it. Knowing the historical and present live trade history of NFI variations, -6% is not an uncommon occurrence. We don’t really know what we will obtain from the strategy on the futures market because I haven’t seen any backtest results done on it thus far. Before putting the bot into action with real money (live), if you wish to use it on futures, please do thorough backtests and lengthy dry runs.

One comment

Leave a Reply

Your email address will not be published. Required fields are marked *