• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

OnBarUpdate Processes

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

  • NinjaTrader_Bertrand
    replied
    Originally posted by jupiejupe View Post
    yes i am placing a exit order and then a entry order, so if i just reverse instead that will take care of the problem?

    thanks so much

    can you also look at this reply, the ninja assist left work before it was resolved, i'd like to get some coding finished this weekend

    http://www.ninjatrader.com/support/f...ad.php?t=46985
    I will look into the thread - correct in case of a reverse don't issue an Exit individually, let the Enter() methods do this as needed for you.

    Leave a comment:


  • jupiejupe
    replied
    yes i am placing a exit order and then a entry order, so if i just reverse instead that will take care of the problem?

    thanks so much

    can you also look at this reply, the ninja assist left work before it was resolved, i'd like to get some coding finished this weekend

    http://www.ninjatrader.com/support/f...ad.php?t=46985

    Leave a comment:


  • NinjaTrader_Bertrand
    replied
    There would be normally 2 reasons seen for this :

    a) strategy vs account position not in sync as needed

    b) you're placing doubled up orders on your conditions such as placing an Exit order on the reversal signal when the enter method would do the reverse for you automatically

    This could only be understood by simplifying and debugging your strategies order event sequence. One very useful tool is the TraceOrders feature :

    http://www.ninjatrader.com/support/f...ead.php?t=3627

    Leave a comment:


  • jupiejupe
    replied
    it matters because every once in a while the strategy places double my contract for the position. but it never does this in backtesting only forward testing, so it is not something that i have control over, it's totally how nt7 places and receives orders.

    i only want my contacts double if i choose to do so not because nt7 gets confused as to the orders placed.

    Leave a comment:


  • NinjaTrader_Bertrand
    replied
    jupiejupie, I'm not exactly sure why you feel it would matter for use but yes that could happen - in realtime trading / simulation you're not processing events according to a historically known sequence but it would depend then on realtime market dynamics seen, the command to reverse will issue 2 orders to achieve that, whoever fills first will be the exit order and the other will serve to get you into the new desired direction.

    Leave a comment:


  • jupiejupe
    started a topic OnBarUpdate Processes

    OnBarUpdate Processes

    during OnBarUpdate i am checking is this is serialized or not.


    i have a strategy that reverses on the same bar, an exit and an entry order.
    the problem is that during backtesting the orders always fire exit followed by the entry order, forward testing this is not the case. entry orders can be executed before the exit.

    i can only figure this happens because OnBarUpdate processes are not serialized within this process.

    if they are then exit orders or not confirmed before the entry order is sent.

    i can not figure out any other reason for this to happen.

Latest Posts

Collapse

Topics Statistics Last Post
Started by babouin77, Yesterday, 08:56 PM
1 response
13 views
0 likes
Last Post NinjaTrader_ChelseaB  
Started by EminiTrader, Today, 11:05 AM
1 response
12 views
0 likes
Last Post NinjaTrader_ChelseaB  
Started by bosajin, Today, 05:43 AM
1 response
19 views
0 likes
Last Post NinjaTrader_ChelseaB  
Started by Jonathan.Lee, Yesterday, 11:42 PM
2 responses
16 views
0 likes
Last Post NinjaTrader_ChelseaB  
Started by JTizz, Yesterday, 12:17 PM
1 response
12 views
0 likes
Last Post NinjaTrader_ChelseaB  
Working...
X