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 judysamnt7, 03-13-2023, 09:11 AM
          4 responses
          57 views
          0 likes
          Last Post DynamicTest  
          Started by ScottWalsh, Today, 06:52 PM
          4 responses
          36 views
          0 likes
          Last Post ScottWalsh  
          Started by olisav57, Today, 07:39 PM
          0 responses
          7 views
          0 likes
          Last Post olisav57  
          Started by trilliantrader, Today, 03:01 PM
          2 responses
          20 views
          0 likes
          Last Post helpwanted  
          Started by cre8able, Today, 07:24 PM
          0 responses
          9 views
          0 likes
          Last Post cre8able  
          Working...
          X