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
    -EC_Chris-
    NinjaTrader Ecosystem Vendor - Emergent Cybernetics

    #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.
    JesseNinjaTrader Customer Service

    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!
      -EC_Chris-
      NinjaTrader Ecosystem Vendor - Emergent Cybernetics

      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.

        https://ninjatrader.com/support/help...ightsub=totime
        https://ninjatrader.com/support/help...lightsub=today

        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.
        JesseNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by muratb35, Today, 03:36 AM
        0 responses
        4 views
        0 likes
        Last Post muratb35  
        Started by fernlicht, Today, 02:16 AM
        2 responses
        13 views
        0 likes
        Last Post fernlicht  
        Started by fernlicht, 04-12-2021, 06:01 PM
        1 response
        29 views
        0 likes
        Last Post NinjaTrader_PaulH  
        Started by memonolog, Today, 02:10 AM
        3 responses
        9 views
        0 likes
        Last Post memonolog  
        Started by orenytz, Today, 12:25 AM
        0 responses
        10 views
        0 likes
        Last Post orenytz
        by orenytz
         
        Working...
        X