Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Adding BarTimer Indicator to a strategy

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Adding BarTimer Indicator to a strategy

    I am trying to add and display the BarTimer indicator from within a strategy i am developing. THe problem I am having is that the Chart displays "BarTimer waiting for realtime data before starting". Does anyone know what I need to do to fix that?

    Here is the code associated with it:

    Private BarTimer BarTimer1;

    Data Loaded Section

    BarTimer1 = BarTimer(Close);
    AddChartIndicator(BarTimer1);


    Thanks,
    Dave

    #2
    Hello davidbecht01,

    Thank you for your post.

    When using AddChartIndicator with BarTimer as the added indicator, when the strategy is applied, the bartimer does not run and displays "BarTimer waiting for realtime data before starting", even though the chart is running real time.

    This is because the indicator does not add plots. You'd need to remove any code that references BarTimer1[0] and add BarTimer1.Update(); to the beginning of the script's OnBarUpdate method to get it working properly. I've attached a very simple example strategy that just adds the Bar Timer to the chart below.

    Please let us know if we may be of further assistance to you.
    Attached Files

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by NullPointStrategies, Yesterday, 05:17 AM
    0 responses
    62 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    134 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    75 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    45 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    50 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X