AlphaTrend is a new indicator which derived from Trend Magic.
Alpha Trend aims to minimize stop losses and provide accurate BUY/SELL signals during trending market conditions, have significant support and resistance levels, and combine indicators from different categories to make a meaningful combination. The Alpha Trend indicator acts as a dead indicator during sideways market conditions and provides BUY and SELL signals from their crossovers with another line. It also acts as support and resistance levels and trailing stop losses during uptrend and downtrend respectively. Additionally, the Alpha Trend indicator combines CCI, ATR, MFI, and RSI indicators to provide information on momentum, trend, volatility, volume, and trailing stop loss.
default values:
coefficient: 1 which is the factor of trailing ATR value
common period: 14 which is the length of ATR MFI
//PRC_AlphaTrend | indicator
//07.04.23
//Nicolas @ www.prorealcode.com
//Sharing ProRealTime knowledge
//author: kivancozbilgic
// --- settings
// AP = 14 //Common Period
// coeff = 1 //Multiplier
// --- end of settings
if (MoneyFlowIndex[ap]>=50) then
magic=Low[0]-AverageTrueRange[ap](close)*coeff
endif
if (MoneyFlowIndex[ap]<50) then
magic=High[0]+AverageTrueRange[ap](close)*coeff
endif
if (MoneyFlowIndex[ap]>=50 and magic<magic[1]) then
magic=magic[1]
endif
if (MoneyFlowIndex[ap]<50 and magic>magic[1]) then
magic=magic[1]
endif
if magic>magic[1] then
r=0
g=255
elsif magic<magic[1]then
r=255
g=0
endif
return magic as "AlphaTrend" coloured(r,g,0) style(line,2)