Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Multi-Series Strategies - Live vs. Historical

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

    #16
    Originally posted by NinjaTrader_Bertrand View Post
    molecool, to clarify better what you're running into -

    'For example if I'm looking back at the past few 60-min candles and it's 17:05 right now'

    So you would be comparing MultiSeries access results here realtime vs historical?

    The difference would be descriebed in our MultiSeries environment docs under 'how bar data is referenced' - http://www.ninjatrader.com/support/h...nstruments.htm

    Summing this up - 'The point is if you have a multi-time frame script in real-time and it is processing tick by tick instead of on the close of each bar, understand that the OHLCV data you access in real-time is different than on historical data.'

    If you're seeing cases where an incorrect event sequence / bar data reference is used in historical mode only, then we would need a simplified and reproducible code example to look into matters.

    Thanks,
    NO that does not appear to be my problem. What's happening is that my price patterns run on long term intervals (i.e. 60-min or 360-min). Let's for instance take an example - a gapping candle that opens one tick or more above the previous close. Now in live mode I would look at the previous candle and do this:

    Opens[1][0] != Closes[0][1]

    So at the very first tick of the new hourly candle we would look at whether the previous candle's close (i.e. the 60-min candle) does not equal the open of the tick series.

    However in historical mode this changes because the current hourly candle (still in progress) does not exist yet until the hour completes. So I have to do this instead:

    Opens[1][0] != Closes[0][0]

    That seems to work for me now in historical mode. The entries are now being pinned on the right candle.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by AaronKoRn, Today, 09:49 PM
    0 responses
    6 views
    0 likes
    Last Post AaronKoRn  
    Started by carnitron, Today, 08:42 PM
    0 responses
    9 views
    0 likes
    Last Post carnitron  
    Started by strategist007, Today, 07:51 PM
    0 responses
    10 views
    0 likes
    Last Post strategist007  
    Started by StockTrader88, 03-06-2021, 08:58 AM
    44 responses
    3,977 views
    3 likes
    Last Post jhudas88  
    Started by rbeckmann05, Today, 06:48 PM
    0 responses
    9 views
    0 likes
    Last Post rbeckmann05  
    Working...
    X