Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

stoping doubling orders

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

    stoping doubling orders

    I am working with an 1hour timeframe charts.
    Sometimes the long and short order is trigger, and on bar close the system shorts 1, close short 1, and go long 1.
    of course I just need to be long 1 (the last order triggered).
    How can I avoiding the first unwanted order?

    #2
    Hello dafonseca,

    I'm not quite sure what you are experiencing.

    Are you attempting to reverse your position?

    Are you calling ExitLong() and EnterShort() on the same bar?

    If so, this will cause 3 orders to be sent. First the ExitLong() will trigger a sell order to exit the position. The position in NinjaTrader does not update immediately and will not update until the order traverses all order states. This will not happen by the the time EnterShort() is called. The EnterShort() will see that you are still in a long position and will send a second order to exit the long position. It will also send a 3rd order to enter the short position.
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

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