Nicolas

AlphaTrend

Category: Indicators By: Nicolas Created: April 7, 2023, 8:00 AM
April 7, 2023, 8:00 AM
Indicators
4 Comments
AlphaTrend

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)

Download
Filename: PRC_AlphaTrend.itf
Downloads: 347
Nicolas
Nicolas Legend
I created ProRealCode because I believe in the power of shared knowledge. I spend my time coding new tools and helping members solve complex problems. If you are stuck on a code or need a fresh perspective on a strategy, I am always willing to help. Welcome to the community!
Author’s Profile

Comments

dadah1987
3 years ago
#

Bonjour Nicolas, merci pour cet indicateur. Utilisant pour l'instant la création simplifié pour créer une stratégie automatique, je ne maitrise pas bien le code. Quel serait t-il pour ouvrir une position acheteuse lorsque la ligne devient verte? / vendeuse lorsque la ligne devient rouge? merci de ton retour.

Nicolas
3 years ago
#

Merci d'ouvrir un sujet sur le forum avec une description complète du système.

Aragorna
3 years ago
#

Dear Nicolas, I'm trying to understand if it's possible to integrate it in a strategy. correct me if I'm wrong but "Magic" is the line of the indicator? to determine the change of trend from green to red and viceversa I have to put MagicMagic[1] ? thank's

Nicolas
3 years ago
#

Yes, Magic if the variable that contains the value of the line, you can test if it goes up or down like you did.

ProRealCode ProRealCode
Loading...