How it works:
The algorithm is based on a combination of well-documented indicators. First, the algorithm calculated the weight_strategy, which represents a value from 0 to 5 of the number of strategies that are fulfilled (in case the weight of each strategy is the same). To open a position, the value of weight_strategy must be greater than the value of weight_signal, by default 2. Modify the indicator parameters for the desired asset and data frame. Set stop-loss and take profit criteria.
Features:
* The algorithm allows to trade with long, short or both positions.
* Backtest the algorithm over a defined interval (data stamp), e.g., from 01/01/2021
* Set stoploss (SL) orders based on a percentage of the previous candle source, e.g., close or hl2 (high + low)/2. Only close the position after the candle is close!
* It can moves the stoploss every time the algo takes profit (TP)
* Take profit based on a percentage of the open position. It is possible to define different values for short positions. Define the percentage of TP to close from the open position.
* Define delays to evaluate the strategies of more previous candles:
+ Candle Delay is for MACD strategy
+ Candle delay Stoch RSI is for the Stochastic RSI strategy.
+ RSI Candle Delay is for the RSI strategy.
+ Candle delay Exit is the number of candles the algorithm waits to open a new position.
* Choose if you want to use the weighted strategy or just some of them.
* Choose the weight (relevance) of each strategy.
* Customize the well-documented MACD strategy.
* Customize the well-documented Stochastic RSI strategy.
* Customize the well-documented RSI strategy.
* Customize the well-documented Supertrend strategy.
* Customize the well documented MA cross strategy.
Example 4H BTC/USDT - Binance
Trading type
* Longs: true
* Shorts: true
Datastamp
* Since 01/01/2021
Stop loss
* StopLoss: true
* Movestoploss: false
* Stop loss %: 6
* Move stop loss factor: -
* Stop source: hl2
Take profit
* Take profits: true
* Long - take profit each x (%): 6.8
* Long- take from open position: 15
* Short - take profit each x (%): 13
* Short - take from open position: 15
Delays
* Candle delay: 1
* Candle delay Stoch RSI: 2
* Candle delay RSI: 2
* Candle delay exit: 7
Weights
* Default (same weights and at least 2 strategies must be satisfied)
Strategy 1: MACD
* MA1: 16
* MA1 type: EMA
* MA1 source: hl2
* MA2: 36
* MA2 type: EMA
* MA source: high
Strategy 2: Stoch RSI
* Exit SRSI long: 70
* Exit SRSI short: 27
* default...
Strategy 3: RSI
* Exit RSI long: 77
* Exit RSI short: 30
Strategy 4: Supertrend
* ATR period: 2
* Source: hl2
* ATR multiplier: 2.4
* change ATR calculation method: true
Strategy 5: MA CROSS
* MA1: 50
* MA1 type: EMA
* MA1 source: close
* MA2: 88
* MA2 type: EMA
* MA source: close