Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Defining trading hours template in NinjaScript code for my strategy

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

    Defining trading hours template in NinjaScript code for my strategy

    Hello,

    Is there a way to define the trading hours template in my NinjaScript code for my strategy?

    When I want to apply the strategy to the instrument I have to define the trading hours every time and also each time I use the strategy in the StrategyAnalyser.

    I use the same trading hours in all of my strategies so it would be convenient to remove this step from the strategy configuration process with it being hard coded into my strategy.

    Thanks,

    Neil

    #2
    Hello Neil,

    Thank you for your post.

    There is an overload for AddDataSeries() that allows you to specify the trading hours to use, though this would only apply for a multi-series script that calls AddDataSeries():


    Ultimately, the Trading Hours selected will be based on the input series for the strategy by default unless you save a new default template. You could consider saving the default strategy template to the desired trading hours session to save you the step of manually changing the trading hours every time you use the strategy. For more information about working with strategy templates:


    Please let us know if we may be of further assistance.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by NullPointStrategies, Today, 05:17 AM
    0 responses
    50 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    126 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    69 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    42 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    46 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X