Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

SampleEnterOnceExitEveryTick

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

    SampleEnterOnceExitEveryTick

    Hi,

    I am reviewing the above sample strategy since I am interested in developing a new strategy based on the same concept. I was a bit confused about how the strategy engine works as bars are constructed, but I think I have it worked out. Please advise if I have this straight in my mind:

    From what I have read and seen in the sample, it seems that during OnBarUpdate(), when Calculate == OnBarClose and IsFirstTickOfBar == true, a reference to any Bar data series such as Close[] with an index of 0 would refer to data of the bar that just closed. But if Calculate == OnPriceChange or OnEachTick, then the the index of 0 would point to the current bar that has just received its first tick and is in the process of being built. Is this correct?

    If so, this means that if Calculate == OnBarClose, then IsFirstTickOfBar is always true and actually means IsLastTickOfBar (and, in effect also means "OnlyTickOfBar"). Correct?

    And all this would be true only for real-time operation with a live market data feed, or with Historical data if using Market Replay or Tick Replay. Otherwise only OnBarClose is valid. Correct?

    Thanks,

    CJ


    #2
    Hello ChazJ,

    Thanks for your post.

    Your understanding is correct.


    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    88 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    134 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    68 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    119 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    67 views
    0 likes
    Last Post PaulMohn  
    Working...
    X