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

How to improve your Amibroker Algo Trading Execution Speed

1 min read

When comes to Automated Trading speed of execution plays a dominant role in executing at better prices. Here I would like to list three important settings in Amibroker that could improve your speed of order execution.

1)Enable Multi-threaded charts execution + GDI(rendering) feature

Goto Tools -> Preferences -> AFL tab and check the box Multi-threaded charts execution + GDI(rendering)

From AmiBroker 5.50 version onwards, Amibroker started supported multithreading (parallel execution on all CPU cores) in both charting and New Analysis window. This greatly enhances speed of operation and improves the responsivity of the application. This could be helpful if you are really working with multiple charting tabs

2)Change the Chart Refresh Interval to Zero

Goto Tools -> Preferences -> Intraday and set the value of Realtime chart refresh interval to 0 instead of the default value 1 as shown below

If the frequency of the real-time updates is set in the preferences to zero then without using RequestTimedRefresh function every tick will get updated instantaneously without any delay. so no RequestTimedRefresh is needed for Realtime data vendors provided they coded their Amibroker data plugin according to the Amibroker Standard. Hence it is highly recommended to use authentic vendors who supports.

Point to be noted: By default Real-time chart refresh interval is set to 1 sec. That limits the chart refresh rate to 1 second. Reducing the Rate to 0 improves the quality of Algo Trade Execution

3)Enable Subsecond Auto-refresh Interval to speed up the execution

Im recently surprised to know that Amibroker supports sub-second chart auto-refresh interval via the function i.e the function RequestTimedRefresh(0.1,false) refreshes the chart every 0.1 second or 100 milli second provided if the registry settings are enabled.

RequestTimedRefresh function supports sub-second (down to 0.1 sec) resolution, when enabled via registry setting (HKCU/Software/TJP/Broker/Settings/EnableHiresRTR, DWORD value = 1 )

How to Enable the Registry Settings

1)Press Windows + R Key together and type Regedit and open the windows registry

2)Goto the registry path HKEY_CURRENT_USER/Software/TJP/Broker/Settings/ and right-click on the right-hand plane and select New and select DWORD(32-bit value) as shown below


3)Enter the Registry Value Name as EnableHiresRTR and the Hexadecimal value as 1 as shown below.

Once All the Settings are enabled restart the PC to check the improved speed of execution.

All the above three settings definitely improve Algov#xecution speed in Amibroker compared to the previous settings. Let me know in the comments how your speed of execution impacted post the settings mentioned above,

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

Line Trading – OpenAlgo Automation Module for Amibroker Users

The line Trading Automation tool is designed for Manual traders who want to perform level-based trade execution faster and also bring some advanced trade...
Rajandran R
55 sec read

Mini Certification Course on Algorithmic Trading

Welcome to the Mini Certification on Algorithmic Trading using Amibroker and OpenAlgo! This comprehensive 4-part series is designed to equip you with the knowledge...
Rajandran R
1 min read

Pivot Reversal Strategy – Tradingview Pinescript to Amibroker AFL…

Pivot Reversal Strategy is a popular in-built strategy in Tradingview Platform. Here I had attempted to convert the pinescript v5 to Amibroker AFL Code....
Rajandran R
3 min read

Leave a Reply

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