Rajandran R Founder of Marketcalls and Co-Founder Algomojo. Full-Time Derivative Trader. Expert in Designing Trading Systems (Amibroker, Ninjatrader, Metatrader, Python, Pinescript). Trading the markets since 2006. Mentoring Traders on Trading System Designing, Market Profile, Orderflow and Trade Automation.

Code Snippet : Time Left Info Near to the Candle/Bars

45 sec read

Here is a small code snippet which displays the seconds left for the bar to close near to the current running candle. If you are more focused on trading at lower timeframe then this feature make more sense as a lower timeframe trader. And the code is compatible above Amibroker 5.71 onwards. It may not work with lower Amibroker versions.

Time Left

 
Timeleft AFL code near to Current Running Candle
https://gist.github.com/e0016caf2f083786c1bf

Timeleft Parameter Settings

Sound Alert is Control added to the External Parameters section and now one can toggle between Sound Off/On from the external dashboard as shown below. Right click over the charts and goto parameters to access the External Parameter Settings where you can control the sound settings. Sound Alert uses Text to speech based Amibroker Alerts

Timeleft Properties

How to Setup the AFL in Amibroker

1)Download Timeleft – Amibroker AFL Code.
2)Unzip Timeleft afl to local folder
3)Copy Timeleft.afl file to \\program files\\amibroker\\formula\\basic folder\\
5)Open Amibroker
6)Goto Charts->Basic Charts and apply/drag-and-drop the Timeleft code over any of your stratgies containing candle/bars over any timeframe.
7)Bingo you are done. Now you will be able to see the timeleft indicatons with sound alerts enabled by default.

Rajandran R Founder of Marketcalls and Co-Founder Algomojo. Full-Time Derivative Trader. Expert in Designing Trading Systems (Amibroker, Ninjatrader, Metatrader, Python, Pinescript). Trading the markets since 2006. Mentoring Traders on Trading System Designing, Market Profile, Orderflow and Trade Automation.

Amibroker Execution Module – Hedged Index Futures for Directional…

In the last tutorial, we learn the importance of Hedging Futures Position with OTM Options for Reduced Margin. This tutorial focus on how to...
Rajandran R
14 min read

Multi Legged Options Execution – Amibroker Module – Button…

This tutorial provides you a basic framework for sending multi-legged options module and how to exit the multi-legged option module using a simple button...
Rajandran R
8 min read

Sending Option Orders and Exiting Option Orders in Algomojo…

This tutorial helps you to understand the options trading module and the requirements to set up and send and exit option orders from Amibroker...
Rajandran R
5 min read

4 Replies to “Code Snippet : Time Left Info Near to the…”

  1. Sir, below line shows error 32.

    PlotTextSetFont(NumToStr(SecsToGo,1,False)+ ” Sec Left”, “Arial”, 10, BarCount-1, Close[BarCount-1], colorRed, colorDefault, -30 );

    Please check it.

      1. yes Sir, my version is Amibroker 5.60
        for this version what is the solution?

  2. sir, i am using 10 minute candle. for example if market open 9:15, the next candle would be 9:25. however, time left code showing 600 seconds. but instead of alerting 9:25, it will alert on 9:20. could you please let us know how to adjust. it.

Leave a Reply

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