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 PaulMohn, Today, 03:49 AM
          0 responses
          1 view
          0 likes
          Last Post PaulMohn  
          Started by inanazsocial, Today, 01:15 AM
          1 response
          6 views
          0 likes
          Last Post NinjaTrader_Jason  
          Started by rocketman7, Today, 02:12 AM
          0 responses
          10 views
          0 likes
          Last Post rocketman7  
          Started by dustydbayer, Today, 01:59 AM
          0 responses
          2 views
          0 likes
          Last Post dustydbayer  
          Started by trilliantrader, 04-18-2024, 08:16 AM
          5 responses
          23 views
          0 likes
          Last Post trilliantrader  
          Working...
          X