Rajandran R Creator of OpenAlgo - OpenSource Algo Trading framework for Indian Traders. Telecom Engineer turned Full-time Derivative Trader. Mostly Trading Nifty, Banknifty, 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. Building Algo Platforms, Writing about Markets, Trading System Design, Market Sentiment, Trading Softwares & Trading Nuances since 2007 onwards. Author of Marketcalls.in

Last 1 Hour Intraday Range on Expiry Day – Amibroker AFL Exploration Code

28 sec read

Here is a simple AFL exploration code that scans and retrieves the last 1 hour of Intraday high and low range on expiry day. Generating this sort of statistics can be further analyzed particularly if you are a weekly options trader.

Amibroker Exploration

Amibroker AFL Code for Last 1 Hour Intraday Range on Expiry Day

//Coded by Rajandran R - Founder - Marketcalls / Co-Founder - Algomojo
//Coded on 22nd Feb 2023
//Website - www.marketcalls.in / www.algomojo.com
//Exploration Module

_SECTION_BEGIN("Computing Last 1 Hour Range on Weekly Expiry");

starttime = 143000;
endtime = 153000;

hi = HighestSince(TimeNum()==starttime,High);
lo = lowestSince(TimeNum()==starttime,low);

range = hi-lo;

Filter = TimeNum()==endtime AND DayOfWeek()==4;
AddColumn(Close,"LTP");
AddColumn(Hi,"High Value");
AddColumn(Lo,"Low Value");
AddColumn(range,"Last Hour Range");


_SECTION_END();
Rajandran R Creator of OpenAlgo - OpenSource Algo Trading framework for Indian Traders. Telecom Engineer turned Full-time Derivative Trader. Mostly Trading Nifty, Banknifty, 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. Building Algo Platforms, Writing about Markets, Trading System Design, Market Sentiment, Trading Softwares & Trading Nuances since 2007 onwards. Author of Marketcalls.in

Interactive Brokers – Smart Order Chart Trading Module using…

The IB Controller is an interface designed to facilitate automatic trading with AmiBroker and Interactive Brokers (IB) TWS (Trader Workstation). It serves as a...
Rajandran R
8 min read

Introducing OpenAlgo V1.0: The Ultimate Open-Source Algorithmic Trading Framework…

OpenAlgo V1.0 is an open-source algorithmic trading platform to automate your trading strategies using Amibroker, Tradingview, Metatrader, Python etc. Designed with the modern trader...
Rajandran R
2 min read

[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

Leave a Reply

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