Rajandran R Telecom Engineer turned Full-time Derivative Trader. Mostly Trading Nifty, Banknifty, USDINR and High Liquid Stock Derivatives. Trading the Markets Since 2006 onwards. Using Market Profile and Orderflow for more than a decade. Designed and published 100+ open source trading systems on various trading tools. Strongly believe that market understanding and robust trading frameworks are the key to the trading success. Writing about Markets, Trading System Design, Market Sentiment, Trading Softwares & Trading Nuances since 2007 onwards. Author of Marketcalls.in)

First 1 Hour Cumulative Volume Scanner – Amibroker Exploration AFL Code

1 min read

Here is the simple prototype for finding first 1 hour cumulative volume for a given script. This helps one to visualize how the volume in the first 1 hour compare to previous trading days.

Amibroker Exploration Settings

It is recommended to explore with 1min timeframe as the code is designed to work on lower timeframes rather than higher timeframes like Daily, Weekly , Monthly.

Exploration Output

Here is the sample exploration output showing that 1st hour volumes are higher in Bank Nifty futures on 15th December 2016 (Post FED Rate hike) reminding that participation activity is high in the first 1 hour. It also provides information on returns it made since the market open in terms of points. High Volume with a trend Indicates that high supply or demand in those zone. However extreme volumes compared to the previous sessions indicates that possibly trend is likely to be exhausted. And in contrast lower volume indicates lower interest from the market participants i.e lower supply or demand in those zone in the first 1 hour.

Amibroker Exploration AFL Code

_SECTION_BEGIN("Volume For 1st Hour");

//Cumulative Volume Monitor Start Time and End Time

starttime = ParamTime( "Start Time", "09:15" );
endtime = ParamTime( "End Time", "10:15" );


Bars_so_far_today = 1 + BarsSince( Day() != Ref(Day(), -1));
StartBar = ValueWhen(TimeNum() == starttime, BarIndex());
points = ValueWhen(TimeNum() == endtime, close)- TimeFrameGetPrice("O",inDaily,0);
TodayVolume = Sum(V,Bars_so_far_today);
V1hour=IIf (BarIndex() >= StartBar AND TimeNum() <= endtime, TodayVolume,Null);


Plot (V1hour, "Total Volume for First One Hour",colorYellow,stylehistogram);


Filter = TimeNum() == endtime;
AddColumn(points,"Points",1.2);
AddColumn(v1hour,"Volume for 1st 1 Hour",1);




_SECTION_END();
Rajandran R Telecom Engineer turned Full-time Derivative Trader. Mostly Trading Nifty, Banknifty, USDINR and High Liquid Stock Derivatives. Trading the Markets Since 2006 onwards. Using Market Profile and Orderflow for more than a decade. Designed and published 100+ open source trading systems on various trading tools. Strongly believe that market understanding and robust trading frameworks are the key to the trading success. Writing about Markets, Trading System Design, Market Sentiment, Trading Softwares & Trading Nuances since 2007 onwards. Author of Marketcalls.in)

[Live Coding Webinar] Build Your First Trading Bridge for…

In this course, you will be learning to build your own trading bridge using Python. This 60-minute session is perfect for traders, Python enthusiasts,...
Rajandran R
1 min read

[Webinar] Understanding and Mitigating Curve Fitting in System Trading

"Understanding and Mitigating Curve Fitting in System Trading"! This dynamic session aims to equip novice to intermediate traders, quantitative analysts, and financial engineers with...
Rajandran R
1 min read

P-Signal Strategy Long Only Strategy – Amibroker AFL Code

This tutorial provides an overview of the P-Signal reversal strategy, a quantitative trading strategy that utilizes statistical parameters and error functions to generate probabilistic...
Rajandran R
2 min read

8 Replies to “First 1 Hour Cumulative Volume Scanner – Amibroker Exploration…”

  1. Thanks. can we tweak this code so that it can give volume comparison for any one hour ( not only the first hour) say from 12.30 to 1.30 thus making it more generic in nature. Actually i more interested in last one hour

  2. Hello Rajan, Good Evening,
    I am a small Trader come investor. I retired Business men due to Physical problem. I am using amibroker since long time. Request your help for a scanner that scan’s scripts that have X1 or above volume when compared with previous session and the script has gained 1% or more when compared to previous day. Hope and awaiting your cooperation.
    Warm Regards
    Vinod

  3. HI Rajandran

    Thanks for your very good site.
    I am looking for stocks that rise every year in january mfebruary,march -can you give us an afl please

    seasonality is important thing.
    tom gentile developed money calander for us stocks. i saw a friend trying to make afl similar to that but he failed.

    thanks
    regards
    ford

  4. hello sir .
    please make amibroker afl intraday scanner for bellow condition . this will help us more , sir please .

    scanner 1=
    intraday scanner for buy
    1 day ago close greater than two day ago high
    current open interest change is more than +2% that previous
    if latast cmp above vwap . and 3 min rsi cross above upward with current 3 min candle ( if possible rsi cross up when rsi is bellow 50)
    OR
    if cmp below vwap and 5 min rsi cross upward with current 5 min candle ( if possible rsi cross up when rsi is bellow 50)

    intraday scanner for sell
    1 day ago close less than two day ago low
    current open interest change is more than +2% that previous
    if latast cmp above vwap . and 5 min rsi cross bellow downward with current 5 min candle ( if possible rsi cross down when rsi is above 50)
    OR
    if cmp below vwap. and 3 min rsi cross bellow downward with current 3 min candle ( if possible rsi cross down when rsi is above 50)

    thanking you sir

  5. can help me to make code for afl

    Pervious day 5 mints time fem between high low area highest volume bar candle high low

Leave a Reply

Get Notifications, Alerts on Market Updates, Trading Tools, Automation & More