Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to trigger/simulate second series update during backtest?

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

    How to trigger/simulate second series update during backtest?

    Hello guys,

    I'm attaching simplified screenshot(from backtest) of what I'm trying to do and here is some context:

    - I have strategy (Calculate.OnEachTick) which is using 2 data series, 60Min(MAIN) and 1Day(SECOND). I want to have updates for second time series inside the day (for current day).
    - It works as expected in LIVE but not in Backtest.
    - Not sure if this helps, but you might ask why do I need this. So this is needed because I want to use indicator attached to BarsArray[1] and be updated during the day while day bar is building. I try to trigger Update for indicator, but this did not help, because BarsArray[1] still not updated.

    So my question if it is possible to trigger 1Day series update on 60Min series like it was a tick for 1Day series? Something similar how you guys doing Update for indicator cache from another series.
    Attached Files
    Last edited by login_dejavu; 03-31-2020, 02:34 AM.

    #2
    Hello login_dejavu,

    One factor here is that you mentioned you use OnEachTick which is not specifically going to be available in back testing. You can use TickReplay to drive the series based on tick replay data/logic but a backtest in general uses OnBarClose processing and only has the OHLC of each bar. In your image I believe what you are highlighting is the constant value of the day bar, that would be expected because the primary is less granular and the day bar has not closed in that span of time to cause a change. If you use TickReplay you would instead set the series of events as the price updates however that would require other logic to determine when your bars close, mainly using the IsFirstTickOfBar property.

    I look forward to being of further assistance.

    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
    69 views
    0 likes
    Last Post PaulMohn  
    Working...
    X