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

Re: Anyone for a Demand Index?



PureBytes Links

Trading Reference Links

Yo, steve

How are you,

do you remenber the di code in Ms language,


Steve 

are you fine?
do you remenber this Di code in ms language, this one is very close 
but there is a problem of scale I have never resolved 

steph



A:=(H+L+2*C);
B:=Mov((HHV(H,2)-LLV(L,2)),19,E);

Buy:= {BuyPressure}
V/Mov(V,19,E) * ((A>=Ref(A,-1)) +
(A<Ref(A,-1)) / 
Exp((0.375 * (A+Ref(A,-1)) /b ) *
(Ref(A,-1)-A) / A));

Sell:={SellPressure}
V/Mov(V,19,E) * ((A<=Ref(A,-1)) +
(A>Ref(A,-1)) / 
Exp((0.375 * (A+Ref(A,-1)) / B ) *
(A-Ref(A,-1)) / Ref(A,-1)));

A:=Mov(Buy,19,E)-Mov(Sell,19,E);
B:=Mov(Sell,19,E)+Mov(Buy,19,E);

(A/B)*100
> 
> You are right, I had to be a bid creative (I borrowed this code as 
well) on 
> just what to use since I did not have the exact functions for BuyP 
and SellP.
> 
> Maybe you can follow-up with that code when you get it.
> 
> Never-the-less, it is very close. Did you check out the gif that I 
sent?
> 
> Thanks
> 
> Steve
> 
> At 12:38 PM 5/13/01 +0100, you wrote:
> >Steve,
> >
> >The Demand Index formula I posted to metastockusers@xxxx uses the
> >Metastock builtin functions Buyb() and Sellp() for Buying Pressue 
(BP) and
> >Selling Pressure (SP) respectively and it produces an identical 
plot to the
> >Metastock builtin Demand Index function (which I would assume is 
correct as
> >per J.Sibbet).
> >
> >Not wishing to be too picky but I should point out for correctness 
sake that
> >the BP and SP calculations in your AFL will not return exactly the 
same
> >values as MS Buyp() and Sellp() functions. The AFL DI plot 
therefore , while
> >extremely similar, will not be identical to Sibett's Demand Index 
(this
> >shows up most at extreme values).
> >
> >If you are monitoring "metastockusers" list I am currently 
awaiting reply
> >from Equis on details of Demand Index calculation which should 
explain the
> >Sibbet calculation of Buyp() and
> >Sellp() and will post back on receipt.
> >
> >John