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

Dataseries-Calculations

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

    Dataseries-Calculations

    Hello,

    I have added to a 24/5 hours primary dataseries in the chart another 3 min chart with RTH Equities trading hours and transparent bars. The purpose is that I want to have the VWAP for 24 hours and for RTH hours plotted in the chart (this works ok of course) and I have some calculations from each showing in the chart that should be "999" outside RTH, but it show another value.
    In the indicator I have if (ToTime(Time[0]) < 093000) {"999"} else if (ToTime(Time[0]) >= 093000 && ToTime(Time[0]) <= 161500){calculations&plottings} This works OK for the primary dataseries but it does not for the dataseries in RTH, it shows me instead of 999 a value from calculation.

    I was working round hours thinking I have made an error in the code, but when I apply the indicator to primary dataseries it works ok and shows "999" (const. value for outside calculation time)

    What is the reason and what to add or modify please?

    Thank you!
    Tony
    Last edited by tonynt; 02-05-2021, 06:03 AM. Reason: add info

    #2
    Hello tonynt,

    Thank you for your post.

    From our help guide on AddDataSeries:

    If your NinjaScript object is using AddDataSeries() allowing to specify a tradingHoursName, please keep in mind that: An indicator / strategy with multiple DataSeries of the same instrument will only process realtime OnBarUpdate() calls when a tick occurs in session of the trading hour template of all added series. Any ticks not processed will be queued and processed as a tick comes in for all subsequent DataSeries.


    In a nutshell what this means is that the script will only process data when a tick occurs in both the RTH series and the primary series, which sounds like may be impacting your results.

    Please let us know if we may be of further assistance to you.
    Kate W.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by tierraany, Today, 01:06 AM
    0 responses
    2 views
    0 likes
    Last Post tierraany  
    Started by Wilmarobyi, Today, 12:48 AM
    0 responses
    3 views
    0 likes
    Last Post Wilmarobyi  
    Started by BackToTheFutures, 08-17-2021, 03:15 PM
    8 responses
    732 views
    0 likes
    Last Post joehanus  
    Started by elirion, Yesterday, 09:32 PM
    0 responses
    8 views
    0 likes
    Last Post elirion
    by elirion
     
    Started by cre8able, Yesterday, 09:15 PM
    1 response
    8 views
    0 likes
    Last Post bltdavid  
    Working...
    X