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

[amibroker] Pressure Indicator



PureBytes Links

Trading Reference Links

I'm trying to create an indicator that will work like the "pressure"
indicator in QuoteTracker, i.e. display the trend in shares selling
at the bid or ask.  Here is what I tried, with the idea of
accumulating each trade and then displaying it on a one-minute chart,
but it doesn't work the way I intended.  I have to believe somebody
else has written the code for this kind of thing, but I didn't find it
in the library.  Any ideas?  TIA

p=Param("Smoothing Period",10,2,200,1);
Cumnv=0;
bd=GetRTData("bid");
ak=GetRTData("ask");
Lp=GetRTData("Last");
tv=GetRTData("tradevolume");
Ct=GetRTData("ChangeTime");
nv=IIf(Lp=ak,tv,IIf(Lp=ak,-tv,0));
Cumnv=IIf(ct<Now(format = 4)-100,Cumnv+nv,nv);
pressure=MA(nv,p);
Hcolor=IIf(cumnv<0,colorRed,IIf(cumnv>0,colorGreen,colorWhite));
Plot(cumnv,"Trade Vol",Hcolor,styleHistogram|styleOwnScale);
Plot(pressure,"Pressure",Hcolor);

Chuck


Content-Description: "AVG certification"
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.15.26/598 - Release Date: 12/22/2006 3:22 PM