[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Anyone for a Demand Index?



PureBytes Links

Trading Reference Links

I hope you enjoy this one.

It is set up as an exploration, system and indicator.

I found this one on the Metastock Egroup user group board "Metastockusers" 
and thought it might be interesting. I hope you do also.

Steve /* Demand Index */
/* Steve Wiser at slwiserr@xxxx */
/* Exploration, System and indicator */

GraphMax=9;

A=(H+L+2*C);
B=ema((HHV(H,2)-LLV(L,2)),19);
BuyP= 
/*{BuyPower}*/
V/ema(V,19) * ((A>=Ref(A,-1)) +(A<Ref(A,-1)) / Exp((0.375 * (A+Ref(A,-1)) /B ) *(Ref(A,-1)-A) / A));

SellP = 
/*{SellPressure}*/ 
V/ema(V,19) * ((A<=Ref(A,-1)) + (A>Ref(A,-1)) / Exp((0.375 * (A+Ref(A,-1)) / B ) * (A-Ref(A,-1)) / Ref(A,-1)));


mabp=ema(BuyP,19); 
masp=ema(SellP,19); /*{smooth Selling Pressure}*/
divsor=iif(mabp>masp,mabp,masp); /*{BP:SP ratio}*/
divend=iif(mabp<masp,mabp,masp); /*{biggest=divisor}*/
var2=1-(divend/divsor); /*{adjust ratio to plot in}*/
var3=iif( (masp>mabp) , -var2 , var2 ) ; /*{range -100 to 100}*/
var4=var3*100; 
Graph1 = var4;
Graph1Style=5;

/* Zero Line */
Graph0=0;


Buy=cross(var4,0);
sell=cross(0,var4);


Filter= (Buy==1) ;
numcolumns = 6;
column0 =ref(C+0.065,-1);
column0format = 1.2;
column0name = "Trigger Price";
column1 = C;
column1name = "Close ";
column1format = 1.2;
column2 = ma(v,17);
column2name = "17 Ma Vol ";
column2format = 1.0;
column3 = ma(C,17)/ma(c,50);
column3name = "% 17/50 ";
column3format = 1.2;
column3format = 1.2;
column4= ma(c,17);
column4name="17 C ma";
column4format = 1.2;
column4= ma(c,50);
column4name="50 C ma";
column4format = 1.2;
Column5=var4;
column5Name="Demand Index";
Column5Format=1.2; 

/* End of Exploration Code. */



<<< text/plain; charset="us-ascii"; format=flowed: Unrecognized >>>