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 terofs, Today, 04:18 PM
          0 responses
          3 views
          0 likes
          Last Post terofs
          by terofs
           
          Started by nandhumca, Today, 03:41 PM
          0 responses
          4 views
          0 likes
          Last Post nandhumca  
          Started by The_Sec, Today, 03:37 PM
          0 responses
          3 views
          0 likes
          Last Post The_Sec
          by The_Sec
           
          Started by GwFutures1988, Today, 02:48 PM
          1 response
          5 views
          0 likes
          Last Post NinjaTrader_Clayton  
          Started by ScottWalsh, 04-16-2024, 04:29 PM
          6 responses
          33 views
          0 likes
          Last Post ScottWalsh  
          Working...
          X