Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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, 09: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:


    Kind regards,
    -ChrisL
    Chris L.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by rhyminkevin, Yesterday, 04:58 PM
    5 responses
    62 views
    0 likes
    Last Post dp8282
    by dp8282
     
    Started by realblubb, Today, 09:28 AM
    0 responses
    2 views
    0 likes
    Last Post realblubb  
    Started by AaronKoRn, Yesterday, 09:49 PM
    1 response
    18 views
    0 likes
    Last Post Rikazkhan007  
    Started by ageeholdings, Today, 07:43 AM
    0 responses
    12 views
    0 likes
    Last Post ageeholdings  
    Started by pibrew, Today, 06:37 AM
    0 responses
    4 views
    0 likes
    Last Post pibrew
    by pibrew
     
    Working...
    X