Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Session Templates?

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

    Session Templates?

    My indicator gets the following error:

    "Time Category Message - Error on calling 'OnStateChange' method: 'AddDataSeries' method only accepts valid trading hours names, but 'Default 24x7' does not exist in the Trading Hours Manager."

    REALLY? ;-)

    #2
    Hello molecool,

    Thank you for writing in.

    Did you create this NinjaScript Strategy/Indicator yourself?

    Or, did you get this NinjaScript Strategy/Indicator from a 3rd party Developer?

    Finally, if you go to a Chart and select the "Default 24x7" trading hours template and click OK, does an error appear?

    Comment


      #3
      Nah I wrote it myself - and I made sure that Default 24x7 worked in the chart (BTCUSD).

      So I eventually got it compiled by using Bars.TradingHours.Name which worked. You may want to document the session strings though somewhere, I only found the attribute by accident.

      Comment


        #4
        Hello molecool,

        Capitalization and spaces matter in matching strings.

        Try "Default 24 x 7"

        You can view the exact name in the Tools -> Trading Hours window. These strings are subject to change by the user.
        Chelsea B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by SalmaTrader, 07-07-2026, 10:26 PM
        0 responses
        92 views
        0 likes
        Last Post SalmaTrader  
        Started by CarlTrading, 07-05-2026, 01:16 PM
        0 responses
        51 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 06-17-2026, 10:32 AM
        0 responses
        23 views
        0 likes
        Last Post CaptainJack  
        Started by kinfxhk, 06-17-2026, 04:15 AM
        0 responses
        34 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Started by kinfxhk, 06-17-2026, 04:06 AM
        0 responses
        34 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Working...
        X