Volume breakout of previous day 10min

hello experts, i am new to amibroker. i require help. i want afl to scan all stocks for current day 10 min volume breaks the previous day highest 10 min volume.

@polestar please, it is important that you read this

How to ask a good question

And you will probably find that similar (perhaps not exactly the same) question has been asked before,

thankyou for showing interest in may question. I am not someone who ask for help until i have tried and i agree their are lot of solutions on the forum but none are near specific to my problem .i have gone through using simple moving average but my strategy does not comply as the scan results are a lot. simple and clarity is very important my question is not 1st bar or last bar specific but any current day 10min bar with volume > any previous day 10min bar with highest volume of all 10min bars of previous day

Can you run this with 10min Periodicty and check if that's what you mean?

nd = Day() != Ref( Day(), -1);

hv1 = HighestSince( nd, V, 1);
hv2 = ValueWhen( nd, HighestSince( nd, V, 2));

cond = hv1 > hv2;
Filter = 1;

AddColumn( cond, "Cond", 1.0 );
AddColumn( hv1, "Today", 1.0 );
AddColumn( hv2,  "Yest", 1.0 );

For now all stocks will appear but check the Column Cond where 1 means the most recent day 10m V bar is higher than the whole of the previous traded day highest 10m V bar.


@polestar I like @travick answer but just to show that in AmiBroker there are usually multiple paths to the same result I thought I'd post my attempt.

An @polestar I didn't know this answer and I do not day-trade so I don't usually use intraday data. But i spent about 5 minutes reading posts on this forum that were about similar subject. Then about 5 more minutes of writing codes that were based upon similar codes on the other forum threads until I came up with this code.

// experiment with different expandPoint, expandFirst, etc.

TodayHighestVolume = TimeFrameCompress( V, inDaily, compressHigh );
ExpandTHV = TimeFrameExpand( TodayHighestVolume, inDaily, expandPoint );
YesterdayHighestVolume = TimeFrameExpand( Ref( TodayHighestVolume , -1 ), inDaily, expandFirst );

// explore our calculations //
Filter = 1;
AddColumn( Volume, "Volume" );
AddColumn( ExpandTHV, "Expand Today High Vol", 1.0 );
AddColumn( YesterdayHighestVolume, "YesterdayHighestVolume", 1.0, colorDefault, colorLightYellow );


But @portfoliobuilder, you and @travick know what you are doing.

@polestar, you as a newbie, have a great responsibility to read, Read, READ. Then try, Try, TRY.

That is the way to learn AFL.

1 Like