Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Do I have to cancel Exit order from ExitLongLimit() if I need to change the price?

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

    Do I have to cancel Exit order from ExitLongLimit() if I need to change the price?

    I am using ExitLongLimi() with fromEntrySignal provided.

    myExitOrder = ExitLongLimit(int barsInProgressIndex, bool isLiveUntilCancelled, int quantity, double limitPrice, string signalName, string fromEntrySignal)

    If isLiveUntilCancelled = false, which means this ExitLongLimit only survives for the length of one bar. Then I could repeat to call ExitLongLimit() in each OnBarUpdate().
    If isLiveUntilCancelled = true, do I have to cancel this ExitLongLimit() in order to re-submit a new exit with different price?

    I printed myExitOrder: no change for the orderId, but price has changed when I call ExitLongLimit() in 2nd time without a cancellation.

    Order To String = orderId='bbb07527ca8845e9bb0222445e950b21' account='Sim101' name='Sell' orderState=ChangePending instrument='IBM' orderAction=Sell orderType='Limit' limitPrice=110.43 stopPrice=0 quantity=100 tif=Gtc oco='' filled=0 averageFillPrice=0 onBehalfOf='' id=10 time='2020-09-15 10:55:53' gtd='2099-12-01' statementDate='2020-09-15'
    Order To String = orderId='bbb07527ca8845e9bb0222445e950b21' account='Sim101' name='Sell' orderState=ChangeSubmitted instrument='IBM' orderAction=Sell orderType='Limit' limitPrice=110.42 stopPrice=0 quantity=100 tif=Gtc oco='' filled=0 averageFillPrice=0 onBehalfOf='' id=10 time='2020-09-15 10:55:53' gtd='2099-12-01' statementDate='2020-09-15'
    Last edited by localappleseed; 09-15-2020, 08:15 AM.

    #2
    Hello localappleseed, thanks for your post.

    If you call ExitLongLimit with the same signal name the price of the order will be modified. If it had a different signal name it would submit a completely separate order. We also have the ChangeOrder method:
    https://ninjatrader.com/support/help...hangeorder.htm

    Kind regards,
    -ChrisL
    Chris L.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by condorhero, Today, 09:28 PM
    0 responses
    5 views
    0 likes
    Last Post condorhero  
    Started by MaraAnkh, Today, 08:44 PM
    0 responses
    6 views
    0 likes
    Last Post MaraAnkh  
    Started by wooofad, Today, 05:38 PM
    0 responses
    7 views
    0 likes
    Last Post wooofad
    by wooofad
     
    Started by caacapital, Today, 10:10 AM
    2 responses
    18 views
    0 likes
    Last Post caacapital  
    Started by DiverG20, Today, 10:23 AM
    0 responses
    23 views
    0 likes
    Last Post DiverG20  
    Working...
    X