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 yeikson89, Today, 02:53 PM
    2 responses
    11 views
    0 likes
    Last Post yeikson89  
    Started by sdauteuil, Today, 01:06 PM
    1 response
    11 views
    0 likes
    Last Post NinjaTrader_Jim  
    Started by trumpy, 03-09-2017, 02:11 PM
    30 responses
    3,226 views
    0 likes
    Last Post foxthorn  
    Started by shani77, Today, 09:58 AM
    1 response
    24 views
    0 likes
    Last Post NinjaTrader_Eleanore  
    Started by cjanau, Yesterday, 11:07 AM
    1 response
    31 views
    0 likes
    Last Post NinjaTrader_ThomasC  
    Working...
    X