Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Automating Trading Stop for Economic Reports

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

    Automating Trading Stop for Economic Reports

    This question is also for NT7 strategy development for automated strategies.

    If you have an automated futures trading strategy for either NT7 or NT8, is there any way to include some type of trading halt for economic reports?

    Can it be coded into the NinjaScript for the strategy to be automated? My guess is no, and the only way to handle is to manually turn off the strategy prior to those reports.

    Thanks

    #2
    Hello,

    Thank you for the post.

    For NT7 there is not really anything built in that would be advisable to use for this purpose, you would just need to add logic to the script to halt for that time period.

    In NT8, you could potentially define that time as a holiday to prevent the script from running during that time. https://ninjatrader.com/support/help...radingHolidays

    I look forward to being of further assistance.

    Comment


      #3
      Ok, that was my understanding.

      Regarding NT7, by you saying "add logic to the script to halt for that time period." The only way to do that would be to put a time frame in, say 7:15-7:30 where the strategy wouldn't trade. But that would mean, every day it wouldn't trade everyday in that time frame.

      Can specific dates be chosen to not trade during that timeframe? For example, let's say we want to chose the first Friday of every month to not trade in that time frame. Essentially you would have to code in every date for the year and re-code that date each year for the code. Is something like that even possible? It seems challenging, just wanting to confirm my assumptions.

      Thanks!

      Comment


        #4
        Hello,

        Yes, you would be working with the standard time object which is a C# DateTime object that contains both a time and date. You would need to make the logic how you would want it to work, so if it was only one day you would need both a time and date filter for that.
        There are some convenience methods to convert the time and date to ints to make them easier to compare or input.




        Using the Time[0] object you could create a time filter that uses both a time and date.

        I look forward to being of further assistance.

        Comment

        Latest Posts

        Collapse

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