• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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.
    JesseNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by HiddenPhilosopher, Yesterday, 11:58 PM
    3 responses
    16 views
    0 likes
    Last Post NinjaTrader_ChrisL  
    Started by Mykro, Yesterday, 09:48 AM
    1 response
    6 views
    0 likes
    Last Post NinjaTrader_ChrisL  
    Started by Brillo, Today, 12:40 PM
    0 responses
    3 views
    0 likes
    Last Post Brillo
    by Brillo
     
    Started by authenticx, 05-29-2020, 03:51 PM
    3 responses
    62 views
    0 likes
    Last Post NinjaTrader_ChrisL  
    Started by nikolaalx, Today, 07:31 AM
    10 responses
    40 views
    0 likes
    Last Post bltdavid  
    Working...
    X