trend_switch
█ Description
Asset price data was time series data, commonly consisting of trends, seasonality, and noise. Many applicable indicators help traders to determine between trend or momentum to make a better trading decision based on their preferences. In some cases, there is little to no clear market direction, and price range. It feels much more appropriate to use a shorter trend identifier, until clearly defined market trend. The indicator/strategy developed with the notion aims to automatically switch between shorter and longer trend following indicator. There were many methods that can be applied and switched between, however in this indicator/strategy will be limited to the use of predictive moving average and MESA adaptive moving average (Ehlers), by first determining if there is a strong trend identified by calculating the slope, if slope value is between upper and lower threshold assumed there is not much price direction.
█ Formula
// predictive moving average
predict = (2*wma1-wma2)
trigger = (4*predict+3*predict +2*predict *predict)
// MESA adaptive moving average
mama = alpha*src+(1-alpha)*mama
fama = .5*alpha*mama+(1-.5-alpha)*fama
█ Feature
The indicator will have a specified default parameter of:
source = ohlc4
lookback period = 10
threshold = 10
fast limit = 0.5
slow limit = 0.05
Strategy type can be switched between Long/Short only and Long-Short strategy
Strategy backtest period
█ How it works
If slope between the upper (red) and lower (green) threshold line, assume there is little to no clear market direction, thus signal predictive moving average indicator
If slope is above the upper (red) or below the lower (green) threshold line, assume there is a clear trend forming, the signal generated from the MESA adaptive moving average indicator
█ Example 1 - Slope fall between the Threshold - activate shorter trend
█ Example 2 - Slope fall above/below Threshold - activate longer trend
Trendanalyisis
Blockunity Divinetrend (BDT)A formidable trend-following indicator, based on an ATR combined with a trailing stop mechanism. Divinetrend’s aim is to offer a simple and efficient alternative to Supertrend, another highly reputed indicator of the same type. It comes with a trading strategy that can be activated in its parameters. You can also change a number of design parameters.
Divinetrend is pretty straightforward in its approach. It calculates a base moving average taking into account the asset’s volatility, multiplies it with an ATR, then displays a line representing a trailing stop. When a red line is broken, the asset is considered to be moving back into an uptrend. Inversely, when a green line is broken, a bearish signal is sent. In the parameters, you can also activate a trend contestation period. If this parameter is activated, the price must have been trending for at least 5 days for the trend change to be validated.
Usage Advice
We recommend that you do not use this indicator with a time unit of less than 2 hours. Ideally in 4 hours or daily, or even 3 days. Otherwise, there’s nothing special about the use of this indicator. We still recommend that you use your logarithmic chart for a better visualization, but this is optional.
This indicator was designed in particular for the crypto market, but it also works on traditional market assets.
The Different Signals
Divinetrend gives buy and sell signals based on trailing stop line breaks and trend orientation. In particular, it can be used for trend identification and following. If the Contested Trend option is activated in the settings, the indicator will also display a contested period in blue. In this case, it is necessary to wait 5 days for the trend to be validated.
Integrated Strategy
In addition, a trading strategy is integrated into the Divinetrend indicator. This can be activated in the parameters. This is mainly there to see the results and the relevance of the indicator in the TradingView Strategy Tester. We do not recommend using it alone. As this strategy is used to study the indicator's performance, we use the following default parameters: An initial capital of 2,000 USDT with 100% of equity in order size. In other words, we'll bet the entire portfolio on each trade. To do this, we use a default stop loss of 10%, to avoid risking heavy losses. We also use a commission of 0.01% and a slippage of 3 ticks to reflect more reality.
Top Trend Backtest (Simple) [Loxx]Simple backtest for Top Trend found here:
What this backtest includes:
-Customization of inputs for Top Trend calculation
-Take profit 1 (TP1), and Stop-loss (SL), calculated using standard RMA-smoothed true range
-Activation of TP1 after entry candle closes
-Long and short signal cross entries
Happy trading!
cATRpillar Strategy**This is my first strategy on the Pine editor, any tips or tricks from the community would be awesome!
This strategy was developed from my indicator "cATRpillar". it uses the ATR range values to determine entry, and uses EMA values to determine an exit if the market goes against it.