Has anyone seen any afl's that capture up and down volume filtered by size of
the sale? Some tradestation people have created an indicator using one tic
chart data, but charted on a 5minute chart, using a line or histogram to track
the buys and sells of large orders, which, of course, assumes this is the smart
money action. The indicator adds buys and subtracts sells of each tic's volume
(for es, say 50 or 100), which creates a line showing buying and selling
pressure; zero being the demarcation between net buying and net selling.
The tradestation code looks something like this:
nputs:
UpColor(darkgreen),
DownColor(red),
DeltaBar(1),
MaxBlock(9999),
MinBlock(0),
ResetDeltaEachBar(0);
variables:
MyVol(0),
color(yellow),
intrabarpersist MyCurrentBar(0),
intrabarpersist VolumeAtBid(0),
intrabarpersist VolumeAtAsk(0),
intrabarpersist BAVolRatio(0),
intrabarpersist VolTmp(0),
intrabarpersist Delta (0),
intrabarpersist DeltaH (0),
intrabarpersist DeltaL (0),
intrabarpersist DeltaO (0);
if LastBarOnChart then begin
MyVol = Iff(BarType < 2, Ticks, Volume);
if CurrentBar > MyCurrentBar then begin
VolumeAtBid = 0;
VolumeAtAsk = 0;
BAVolRatio = 0;
VolTmp = 0;
MyCurrentBar = CurrentBar;
if ResetDeltaEachbar = 1 then Delta =0;
DeltaO = Delta;
DeltaH = Delta;
DeltaL = Delta;
end;
if (Block >= MinBlock) and (Block <= MaxBlock) then
if Close <= InsideBid then
Delta = Delta - MyVol + VolTmp
else if Close >= InsideAsk then
Delta = Delta + MyVol - VolTmp ;
VolTmp = MyVol ;
end;
end;
DeltaH = maxlist(DeltaH, Delta);
DeltaL = minlist(DeltaL, Delta);
if Delta <= 0 then color = DownColor else color = UpColor;
plot1(DeltaO, "DO");
Plot2(DeltaH, "DH");
Plot3(DeltaL, "DL");
plot4(Delta, "DC");
I don't find anything like this in the current AFL list. I am a novice with
AFL's, so am having trouble converting the TS code to AFL.