Here's an example of how you might write an AmiBroker AFL code to spot the highest volume of the day in a 5-minute timeframe:
TimeFrameSet(in5Minute); // switch to 5 minute frame
vol = Volume; // get the volume
// switch back to original time frame
TimeFrameRestore();
// expand to original time frame
vol = TimeFrameExpand(vol, in5Minute);
// find the highest volume of the day
highestVol = TimeFrameApply(inDaily, HHV, vol, 1);
Plot(highestVol, Highest Daily Volume, colorBlue);
This code first switches to a 5-minute timeframe and gets the volume. It then switches back to the original timeframe and expands the volume of data to this timeframe. Finally, it finds and plots the highest volume of each day.
Note:This is a simple example and may need to be adjusted based on your specific needs. Always test your AFL scripts thoroughly before using them for actual trading. Also, remember that past performance is not indicative of future results.