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

How are plots affected during transition from historical to real time?

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

    How are plots affected during transition from historical to real time?

    Have working strategy, tick based, running properly for several weeks with two overlay plots. Just added two additional plots. All four overlay plots added via AddPlot() in State.SetDefaults. Tick replay is enabled. Historical and real time tick data is available from provider. Data for plots 1 and 2 is calculated from start of State.Historical and continuously calculated during real time. Data for plots 3 and 4 only begins to calculate once real time data is available. Plots 3 and 4 behave as expected. Plots 1 and 2 work as expected only through historical data processing but do not plot thereafter. However, Print() confirms that plots 1 and 2 data series are updated from beginning of historical data processing and throughout real time processing, tick by tick. But the data is not displayed once historical processing completes. What happens between end of historical processing and start of real time processing to cause this? Why are the only plots affected the ones that were not updated during historical processing? What am I doing wrong here?

    UPDATE to original post. BEFORE ANYONE SPENDS TIME ON THIS, I have identified the problem and it is just a clumsy botch on my part. The original plots (now plots 3 and 4) were to display stop levels, and so they had to be set to transparent brushes when flat. I plugged the AddPlot statements for the additional plots (now plots 1 and 2) in above the AddPlot statements for the original plot, but failed to correctly change the PlotBrushes[][] indexing in the OnBarUpdate code that followed. So plots 1 and 2 were present, but transparent. Ugh.
    Last edited by jvanelli; 09-03-2019, 10:33 PM.

    #2
    Hello jvanelli,

    With TickReplay enabled, I would not expect any change from historical to real-time. Without TickReplay Calculate will always be .OnBarClose in historical data. In real-time if you have Calculate set to .OnPriceChange, or .OnEachTick this would behave differently than the historical data which would still be .OnBarClose.
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by zstheorist, Today, 07:52 PM
    0 responses
    3 views
    0 likes
    Last Post zstheorist  
    Started by pmachiraju, 11-01-2023, 04:46 AM
    8 responses
    149 views
    0 likes
    Last Post rehmans
    by rehmans
     
    Started by mattbsea, Today, 05:44 PM
    0 responses
    5 views
    0 likes
    Last Post mattbsea  
    Started by RideMe, 04-07-2024, 04:54 PM
    6 responses
    33 views
    0 likes
    Last Post RideMe
    by RideMe
     
    Started by tkaboris, Today, 05:13 PM
    0 responses
    5 views
    0 likes
    Last Post tkaboris  
    Working...
    X