Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

See the order buy before order execution

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

    See the order buy before order execution

    Hi!

    I have some strategies that see the close and order for open in next day.
    In next day, when open the session the order say Buy or Sell something.

    And if I have enable the strategy and with mouse in strategy if I choose "strategy performance" and after "Historical & Real-time" I can this, example:

    I see this Order "buy" in 6 june 2016 and Execution, order execution in 7 june 2016.

    Well, if my strategy is based in the close value "Calculate in bar close" and the order is for next day...

    My question: it is not possible after the close, more or less some minutes, see if there are a order buy/sell for next day?

    Thanks

    #2
    Hello jmagaia,

    Thank you for writing in.

    With NinjaTrader 7, the close of a bar doesn't actually occur until the first tick of the next bar's open. So, in this case, no logic in your strategy is going to be called until the next bar's open with CalculateOnBarClose set to true.

    You would not be able to see if your strategy is going to produce an order because your strategy has not yet even calculated if it's going to do so or not. It won't be able to do this until the next bar opens.

    If you wish for your strategy to let you know if it's going to make an order for the next day's open, your strategy is going to have to run intrabar and make that decision before the last bar of the session closes. This can be done by setting CalculateOnBarClose to false.

    To prevent your strategy from submitting orders intrabar, you can use FirstTickOfBar to run entry logic as if CalculateOnBarClose is set to true: https://ninjatrader.com/support/help...ttickofbar.htm

    Additionally, you can check FirstBarOfSession as well so your entry order will only occur on the first bar of a new session: https://ninjatrader.com/support/help...rofsession.htm

    Outside of the FirstTickOfBar check, allow your strategy to determine if it will enter or not (as this will be calculated on every tick that comes in). Based on this determination, you can use a boolean with the FirstTickOfBar and FirstBarOfSession checks to enter on the open of the next bar.
    Zachary G.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by maybeimnotrader, Today, 05:46 PM
    0 responses
    6 views
    0 likes
    Last Post maybeimnotrader  
    Started by quantismo, Today, 05:13 PM
    0 responses
    6 views
    0 likes
    Last Post quantismo  
    Started by AttiM, 02-14-2024, 05:20 PM
    8 responses
    167 views
    0 likes
    Last Post jeronymite  
    Started by cre8able, Today, 04:22 PM
    0 responses
    8 views
    0 likes
    Last Post cre8able  
    Started by RichStudent, Today, 04:21 PM
    0 responses
    5 views
    0 likes
    Last Post RichStudent  
    Working...
    X