Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Use "Default 24 x 7" as trading hours but only place orders during RTH?

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

    Use "Default 24 x 7" as trading hours but only place orders during RTH?

    I would like to use the "Default 24 x 7" trading hours for my data series, but specify my strategy to only place orders during "US Equities RTH". Is this possible to do? How would I achieve this in the NinjaScript editor in my strategy code?

    #2
    Hello herbnderby,

    Thank you for your post.

    You could add an additional data series to your script for RTH Trading Hours and submit orders to that added series. AddDataSeries() would be used to add an additional data series to your script. Then you would check if the added series is processing by creating a condition checking if (BarsInProgress == 1) and submit orders within this condition to submit them to the added series.

    Please note that Realtime OnBarUpdate() iterations will only happen when in both trading hours periods.

    See the help guide documentation below for more information.
    AddDataSeries() - https://ninjatrader.com/support/help...dataseries.htm
    BarsInProgress() - https://ninjatrader.com/support/help...inprogress.htm

    Something else you could do would be to add time checks to your script to submit orders within a certain time frame.

    See the help guide documentation below for more information about creating time checks.
    Creating Time Comparisons - https://ninjatrader.com/support/help...imeComparisons
    Creating Time Filters - https://ninjatrader.com/support/help...ateTimeFilters

    Let us know if we may assist further.
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    45 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    21 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    31 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    50 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    42 views
    0 likes
    Last Post CarlTrading  
    Working...
    X