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

How to create a stop while also using limit orders

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

    How to create a stop while also using limit orders

    Hello, I have a strategy that plots the exit by a limit order on the EMA, however, I also want a stop that is listed on the exchange, as opposed to an ExitLongStopMarket for instance, which is not listed. However, when I try to add the code for a stop that I get from using the strategy builder, the stop does not appear when the strategy runs.

    I just want a stop to appear in the same way it does when I make a simple strategy in the strategy builder (the stop is not intended to "move" from the entry price like the target does - following the EMA

    Asking for some help, thank you.

    #2
    Hello Austiner87,

    Thank you for your post.

    What code did you try to add for a stop? What order type would you like to use instead of ExitLongStopMarket()? Do you see any error messages on the Log tab of the Control Center when testing your strategy and seeing that the stop does not appear? If so, what do the errors report?
    • To send a screenshot with Windows 10 or newer I would recommend using the Windows Snipping Tool.
    • Alternatively to send a screenshot press Alt + PRINT SCREEN to take a screenshot of the selected window. Then go to Start--> Accessories--> Paint, and press CTRL + V to paste the image. Lastly, save it as a jpeg file and send the file as an attachment.

    I look forward to your reply.
    Emily C.NinjaTrader Customer Service

    Comment


      #3
      Your ask to post my code answered my question - the stops were appearing correctly after I fixed something small in the code, thank you

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by rbeckmann05, Yesterday, 06:48 PM
      1 response
      12 views
      0 likes
      Last Post bltdavid  
      Started by llanqui, Today, 03:53 AM
      0 responses
      6 views
      0 likes
      Last Post llanqui
      by llanqui
       
      Started by burtoninlondon, Today, 12:38 AM
      0 responses
      10 views
      0 likes
      Last Post burtoninlondon  
      Started by AaronKoRn, Yesterday, 09:49 PM
      0 responses
      15 views
      0 likes
      Last Post AaronKoRn  
      Started by carnitron, Yesterday, 08:42 PM
      0 responses
      11 views
      0 likes
      Last Post carnitron  
      Working...
      X