RicardoSantos

[RS]DeMark Range Expansion Index V0

request for jangseohee
adapted from here: https://www.amibroker.com/newsletter/02-...
Supprimer des scripts favoris Ajouter aux scripts favoris
//@version=2
study(title='[RS]DeMark Range Expansion Index V0', shorttitle='REI', overlay=false)
//  ||  Tom DeMark's Range Expansion Index 
//  ||  AFL Implementation by Tomasz Janeczko 
//  ||  Source:     https://www.amibroker.com/newsletter/02-2000.html
length = input(5)

HighMom = high - high[2]
LowMom = low - low[2]

Cond1 = high >= low[5] or high >= low[6] 
Cond2 = high[2] >= close[7] or high[2] >= close[8] 
Cond3 = low <= high[5] or low <= high[6] 
Cond4 = low[2] <= close[7] or low[2] <= close[8]

Cond = ( Cond1 or Cond2 ) and ( Cond3 or Cond4 )

Num = Cond ? HighMom + LowMom : 0
Den = abs(HighMom) + abs(LowMom)

TDREI = 100 * sum( Num, length )/sum( Den, length ) 

plot(title='REI', series=TDREI, color=black)
hline(title='OB', price=80, color=black)
hline(title='OS', price=-80, color=black)

Commentaires

It's lack some conditions. The original have 12 conditions. : )
I've gone crazy when I saw it.
Répondre
Thank you Ricardo ^_^
Répondre
Accueil Screener d'actions Screener Forex Screener Crypto Calendrier économique Comment ça marche Caractéristiques du graphique Prix Parrainer un ami Règles de conduite Centre d'aide Solutions site web & courtier Widgets Solutions de cartographie Bibliothèque de graphiques allégés Blog & News Twitter
Profil Paramètres du Profil Compte et Facturation Parrainer un ami Mes tickets au support Centre d'aide Idées Publiées Followers Suivi(e) Messages privés Chat Se Déconnecter