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?
    Clayton G.NinjaTrader Customer Service

    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 rhyminkevin, Yesterday, 04:58 PM
        5 responses
        62 views
        0 likes
        Last Post dp8282
        by dp8282
         
        Started by realblubb, Today, 09:28 AM
        0 responses
        2 views
        0 likes
        Last Post realblubb  
        Started by AaronKoRn, Yesterday, 09:49 PM
        1 response
        18 views
        0 likes
        Last Post Rikazkhan007  
        Started by ageeholdings, Today, 07:43 AM
        0 responses
        12 views
        0 likes
        Last Post ageeholdings  
        Started by pibrew, Today, 06:37 AM
        0 responses
        4 views
        0 likes
        Last Post pibrew
        by pibrew
         
        Working...
        X