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

NT7 managed exit long, go short limit

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

    NT7 managed exit long, go short limit

    Hello,

    i have a question for my NT7 strategy, which i develop in managed mode for the MarketReplay:

    I receive a Signal and through EnterLongLimit that get filled later, i have multiple long Entries.

    When i receive the next signal, i want to Exit my current long positions and place multiple short limit orders. I do it the following way:

    HTML Code:
    if(Position.MarketPosition == MarketPosition.Long){
    ExitLong(Position.Quantity);
    							
    							}
    							Print(Time[0] + " enter short limit at: " + ((Close[1] + (TickSize*limitOrderOffset))));
    
    							entryOrder1 = EnterShortLimit(0, true, firstProfitQty, (Close[1] + (TickSize*limitOrderOffset)), "Entry1");
    							entryOrder2 = EnterShortLimit(0, true, secondProfitQty, (Close[1] + (TickSize*limitOrderOffset)), "Entry2");
    							if((quantity-firstProfitQty-secondProfitQty) > 0){
    								entryOrder3 = EnterShortLimit(0, true, (quantity-firstProfitQty-secondProfitQty), (Close[1] + (TickSize*limitOrderOffset)), "Entry3");
    							}
    somehow the new limit orders are not placed. what is wrong with that?

    Thank you!

    #2
    Hello maynn,

    Thanks for your post.

    When you run your strategy and you see the Print statement print, do you see any error messages in the "Log" tab of the control center?
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Hello,

      thanks for your answere.

      Unfortunatly i the new limit order is not written into the Log tab.
      But in the print window the limi order is traced. I attach it within 2 pictures.
      Attached Files

      Comment


        #4
        Hello maynn,

        Thanks for your reply.

        Please send us your complete log and trace files so we may review, to PlatformSupport[at]NinjaTrader[dot]com Mark the subject line: Atten:Paul and include a link to this thread.

        Please follow the steps below to manually attach your log and trace files to your e-mail

        Open your NinjaTrader folder under My Documents.
        Right click on the 'log' and 'trace' folders and select Send To> Compressed (zipped) Folder.
        Send the 2 compressed folders as attachments to the email.
        Once complete, you can delete these compressed folders.
        Paul H.NinjaTrader Customer Service

        Comment


          #5
          I followed your descriped steps,

          thanks!

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Tim-c, Today, 02:10 PM
          1 response
          6 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by Taddypole, Today, 02:47 PM
          0 responses
          2 views
          0 likes
          Last Post Taddypole  
          Started by chbruno, 04-24-2024, 04:10 PM
          4 responses
          50 views
          0 likes
          Last Post chbruno
          by chbruno
           
          Started by TraderG23, 12-08-2023, 07:56 AM
          10 responses
          399 views
          1 like
          Last Post beobast
          by beobast
           
          Started by lorem, Yesterday, 09:18 AM
          5 responses
          25 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Working...
          X