Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Is it possible to make a trade happen at the open?

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

    Is it possible to make a trade happen at the open?

    On my strategy analyzer day bar chart it appears that, when the analyzer is directed to buy or sell, the trade does not occur until the open of the following day. Is it possible to make it happen at the open of the same day instead of the open of the following day?

    I tried switching 'CalculateOnBarClose' but that did not help. Seems like it makes sense in the real trading world and seems like it could be done within NT...but of course I fully understand there can be many reasons why it would be illogical to do so. I just want to understand why.

    #2
    You would be able to do this if CalculateOnBarClose was set to false, however as you have pointed out this would only work in real time.

    If you want a trade to trigger at the open you will have to determine a few things first

    1. Do you need to be able to backtest this, or only run it in real time?
    2. what information do you need to calculate this data. Specifically do you need data from the day that is being entered on?

    If you want to backtest you would need a multi time frame script:
    You can submit orders to different Bars objects. This allows you the flexibility of submitting orders to different timeframes. Like in live trading, taking entry conditions from a 5min chart means executing your order as soon as possible instead of waiting until the next 5min bar starts building. You can achieve this by

    You can submit orders to different Bars objects. This allows you the flexibility of submitting orders to different timeframes. Like in live trading, taking entry conditions from a 5min chart means executing your order as soon as possible instead of waiting until the next 5min bar starts building. You can achieve this by


    Most of the time when I hear this question it's because someone is trying to enter at the close of a day and it's not entering until the open of the following. In your case if you're entering an open of a bar to late there might be some internal logic that needs to be changed to read values from the bar earlier.
    LanceNinjaTrader Customer Service

    Comment


      #3
      I have somehow managed to get two threads going on the same subject.
      Below is a reply I just sent to Patrick and Kogamon on the same subject at http://www.ninjatrader.com/support/forum/showthread.php?t=59931&goto=newpost


      I apologize. You guys are knocking yourselves out trying to help me and I have confused the issue.

      My simulation objective is:
      At Forex EOD [5:00PM EDT] I have an indicator value. At next day Forex opening [5:15PM EDT] I enter either long or short depending on whether the opening is above or below that indicator value.

      My simulation problem is:
      The Analyzer applies the trade one bar later [24 hours later for day bars, 1 minute later for minute bars, etc.]

      My question is:
      Is there a means within NT whereby I can eliminate the one bar trade delay?

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by ETFVoyageur, Today, 02:08 AM
      0 responses
      7 views
      0 likes
      Last Post ETFVoyageur  
      Started by kujista, 04-22-2024, 07:46 AM
      3 responses
      12 views
      0 likes
      Last Post kujista
      by kujista
       
      Started by kujista, 04-23-2024, 06:23 AM
      7 responses
      57 views
      0 likes
      Last Post kujista
      by kujista
       
      Started by SentientDavid, Today, 01:34 AM
      0 responses
      8 views
      0 likes
      Last Post SentientDavid  
      Started by MrForgetful, Today, 01:28 AM
      0 responses
      6 views
      0 likes
      Last Post MrForgetful  
      Working...
      X