OPEN-SOURCE SCRIPT

DCA, Support and Resistance with RSI and Trend Filter

Par alescha13
Mis à jour
This script is based on
tradingview.com/v/8avMvSbe/ script from Kieranj with added pyramiding and DCA

The buy condition (buyCondition) is triggered when the RSI crosses above the oversold threshold (ta.crossover(rsi, oversoldThreshold)), the trend filter confirms an uptrend (isUptrend is true), and the close price is greater than or equal to the support level (close >= supportLevel).

The partial sell condition (sellCondition) is triggered when the RSI crosses below the overbought threshold (ta.crossunder(rsi, overboughtThreshold)) and profit goal is reached, the trend filter confirms a downtrend (isUptrend is false), and the close price is less than or equal to the resistance level (close <= resistanceLevel).
Full sell will be triggered if trend is broken and profit goal is reached

With this implementation, the signals will only be generated in the direction of the trend on the 4-hour timeframe. The trend is considered up when the 50-period SMA is below the 200-period SMA (ta.sma(trendFilterSource, 50) < ta.sma(trendFilterSource, 200)).

Pyramiding should be activated, values like 100, so every DCA step should be around 1%
i have best results on 5 min charts
Notes de version
-Added Wavetrend as additional indicator for buying/selling
-Set all default parameters same as i doing backtests.
-other small fixes
Notes de version
Added new option:
Using g trend as trend filter module:
tradingview.com/v/utIrJYJS/
thanks LUIS_GANDARA_G_TREND
Notes de version
- Added MCAD as trend indicator

- Reworked multi time frames :
The strategy working now on 3 time frames
1. Time frame where buy/sell signals on base of Wavetrend(default is on) and RSI are triggered. I'm using 5 min.
2-3. Slow and fast trend time frames. Signals from time frame 1 are ignored if on this time frames RSI or Trend (MCAD or G trend) conditions are not meet. I'm using 15 min and 4 hours.
Notes de version
- in previous post index was of course MACD, cant edit anymore
- Added new option for cooldown between orders
- fixed several bugs, specially on short side trading
Notes de version
- added new option: based on ATR partial sells can be deactivated
- updated default values
Stochastic RSI (STOCH RSI)Wave Analysis

Script open-source

Dans le plus pur esprit TradingView, l'auteur de ce script l'a publié en open-source, afin que les traders puissent le comprendre et le vérifier. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais la réutilisation de ce code dans une publication est régie par nos Règles. Vous pouvez le mettre en favori pour l'utiliser sur un graphique.

Vous voulez utiliser ce script sur un graphique ?

Clause de non-responsabilité