Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

when does firstTickOfBar trigger?

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

    when does firstTickOfBar trigger?

    Click image for larger version

Name:	image_73303.png
Views:	163
Size:	56.1 KB
ID:	1199854 i have a indicatorA that has 1 timeframes.

    1. baseTimeframe that renders the values and plots values on isFirstTickOfBar
    2. higherTimeframe that does calculation on isFirstTickOfBar for that particular timeframe

    I have other indicators /Strategies that calls on indicatorA on the same base timefraem and works on isFirstTickOfBar.
    Would the sFirstTickOfBar be triggered after both the isFirstTickOfBar for both timerames in indicator A?
    I attempted to explain my confusion in the following picture

    #2
    Hello junkone,

    Thank you for your note.

    IsFirstTickOfBar only relates to the current series updating OnBarUpdate. So it will be true, if the tick currently processing in OBU is the first tick of that bar series, and we'd see it be true multiple times, once for each series on the first tick of a new bar for that series.

    As a note, the first tick of bar first for the primary series when both series have the same tick that opens a new bar (for example, if your primary series is a 1 minute series and the secondary is a 5 minute, every 5 minutes when the two bars end at the same time, the first tick of the 1 minute bar will be processed before the 1st tick for the 5 minute bar).

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

    Comment


      #3
      lets assume UTC for convenience and i am using it for EURUSD.
      lets take 3 timeframes as part of indicator A
      1. 30 minute bar(base timeframe)
      2. daily timeframe bar

      When indicator B(30 minute timeframe as base) calls A
      #1. At every half hour mark except midnight, will the firstTickOfBar for B be after the completion of FirstTickofBar for all 30 minute Timeframes in A
      #2. At midnight, will the first TickOfBar be after the completion of FirstTickofBar for daily and 30 minute timeframe of A?

      Comment


        #4
        Hello junkone,

        Thank you for your reply.

        You'd need to use Update() to update both series of the hosted indicator on historical data. I'm attaching a simple pair of example scripts that demonstrates...we update the indicator so we see first the print for 1st tick for bar A, 5 updates for the secondary series for A, then the print for indicator B. Indicator B can be tested on a 1 minute chart.

        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 Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        574 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        333 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        101 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        553 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        551 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X