Welcome Features News Download Registration Support FAQ Wish list Links
Advanced stock charting and analysis program

AFL Library

This is read-only version of AFL library entry. Ability to add user formulas and comment is only available from members-only area.

Details:

Formula name: Market Direction
Author/Uploader: Dimitris Tsokakis -
Date/Time added: 2002-03-24 14:03:12
Origin:
Keywords:
Level: advanced
Flags: indicator

DISCLAIMER: Most formulas present in AFL on-line library are submitted by the users and are provided here on an "as is" and "as available" basis. AmiBroker.com makes no representations or warranties of any kind to the contents or the operation of material presented here. We do not maintain nor provide technical support for 3rd party formulas.
Description:

Market direction is described through 3 composite tickers, based on Relative slope values. You may read on daily basis the % distribution of bullish, congestive and bearish phase of the Market.

Formula:

/*BULL-BEAR-CONGESTIVE*/
K=EMA((H+L+C)/3,10);
S1=2*(K-Ref(K,-1))/(K+Ref(K,-1));
RS=100*EMA(S1,3);
values16 = abs(rs)<=1;
values17=rs>1;
values18=rs<-1;
AddToComposite(Values16,"~rscongestion","V");
AddToComposite(Values17,"~rsbullish","V");
AddToComposite(Values18,"~rsbearish","V");
Buy=0;

Comments:

Dimitris Tsokakis

2002-03-24 14:04:46
/*Market Direction Graph*/
TOT=Foreign("~rsbearish","v")+Foreign("~rsbullish","v")+Foreign("~rscongestion","v");
Graph1=100*Foreign("~rsbullish","v")/TOT;
Graph1Color=5;
Graph0=100*Foreign("~rscongestion","v")/TOT;
Graph0BarColor=7;
Graph2=100*Foreign("~rsbearish","v")/TOT;
Graph2Style=1;
Graph2BarColor=4;
Title="BULLISH = "+WriteVal(Graph1,FORMAT= 1.1)+"% , CONGESTIVE = "
+WriteVal(Graph0,FORMAT=1.1)+"% , BEARISH = "+
WriteVal(Graph2,FORMAT=1.1)+" %";


Dimitris Tsokakis
tsokakis [at] oneway.gr
2002-08-06 04:31:57
You may increase the sensitivity of the Market Direction indicator replacing the

values16 = abs(rs)<=1;
values17=rs>1;
values18=rs<-1;
with
values16 = abs(rs)<=0.75;
values17=rs>0.75;
values18=rs<-0.75;
or even
values16 = abs(rs)<=0.5;
values17=rs>0.5;
values18=rs<-0.5;
for more expressive results.




About | Privacy | Terms of Use | Contact information
Copyright © 2001 AMIBROKER.COM