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

Close of Strategy leads to SL Error

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

    Close of Strategy leads to SL Error

    Hello everyone,

    I have created a simple strategy with a simple buy condition and and a close condition as well. In addition there is also a SL, but the SL serves more or less just as a last defense and is just 20% away from the entry. I started trading the strategy two weeks ago in my demo account.
    The problem now is: that every time my close condition is triggered (which workes as supposed), but when the strategy tries to cancel the SL an error occurs, the SL remains and the strategy deactivates itself. Here is the error message (which can also be seen in the attached screenshots):


    Strategy [Strategy Name] submitted a cancellation request for Order ID ‘orderID=’XXXXXXXXXXXXX’ account=’XXXXXXXXX’ name=’Stop loss’ oderState=accepted instrument=’BK oderAction=sell orderType=’StopMarket’ limitPrice=0 stopPrice=39.24 quantity=174 tif=Gt coco=’filled=0 averageFilPrice=0 onBehalfOf= id=11 time=’2022-03-01 15:45:03’ gtd=’2099-12-01’ statementDate=’2022-03-01’ which has not been confirmed cancelled. Please check your account orders and positions.
    Do I have to cancel the SL order via code before the exit conditions exits the position or what is my mistake?
    Thank you in advance!

    Click image for larger version

Name:	01.PNG
Views:	46
Size:	26.6 KB
ID:	1191972
    Click image for larger version

Name:	03.PNG
Views:	32
Size:	24.3 KB
ID:	1191973
    Click image for larger version

Name:	02.PNG
Views:	35
Size:	25.6 KB
ID:	1191974

    #2
    Hello funtra513,

    Thank you for your note.

    I would want to look at your log and trace files to determine what may be occurring and how to potentially avoid this. Since these may contain personally identifiable information, we would ask that you send those in to us directly via the platform rather than post them here.

    You can do this by going to the Control Center-> Help-> Email Support. Ensuring 'Log and Trace Files' is checked will include these files. This is checked by default.

    Please reference the following ticket number in the body of the email: 3508991 ATTN Kate W.

    If you can also provide the strategy as an attachment to the email, that would be helpful as well, or you can just post that here.

    Thanks in advance; I look forward to assisting you further.
    Kate W.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Jimmyk, 01-26-2018, 05:19 AM
    6 responses
    835 views
    0 likes
    Last Post emuns
    by emuns
     
    Started by jxs_xrj, 01-12-2020, 09:49 AM
    6 responses
    3,291 views
    1 like
    Last Post jgualdronc  
    Started by Touch-Ups, Today, 10:36 AM
    0 responses
    11 views
    0 likes
    Last Post Touch-Ups  
    Started by geddyisodin, 04-25-2024, 05:20 AM
    11 responses
    62 views
    0 likes
    Last Post halgo_boulder  
    Started by Option Whisperer, Today, 09:55 AM
    0 responses
    9 views
    0 likes
    Last Post Option Whisperer  
    Working...
    X