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

Problem with Entering Two Limit Orders

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

    Problem with Entering Two Limit Orders

    Hi,

    I have a strategy that involves entering two limit orders:

    EnterLongLimit(DefaultQuantity, firstEntryPrice, "1st");
    EnterLongLimit(DefaultQuantity, firstEntryPrice, "2nd");

    In Initalize() I include the following:
    EntriesPerDirection = 1;
    EntryHandling = EntryHandling.UniqueEntries;//AllEntries;//.UniqueEntries;
    SetProfitTarget("1st",CalculationMode.Ticks, 4);
    SetProfitTarget("2nd",CalculationMode.Ticks, 8);

    The problem I'm having is that the strategy only executes one contract. When I put in one limit order with 2 contracts in the code it works. But two separate limit orders with two different signal names does not work.

    Any suggestions on what might be causing the problem?

    #2
    Hello ganbare112,

    Thanks for your post.

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

    Comment


      #3
      No, I don't see any error messages.

      Comment


        #4
        Hello ganbare112,

        Thanks for your reply.

        Your code, tested here (substituted Close[0] + 4*TickSize for firstEntryPrice) shows both orders are placed/filled, see attached.

        Please send me your log and traces files so I may investigate this further (do not post them here due to information in the files). Send an e-mail to PlatformSupport[at]NinjaTrader[dot]Com. Mark the e-mail Atten:Paul and add a link to this thread in the e-mail. Please follow the steps below to manually attach your log and trace files to your e-mail:

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

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by NRITV, Today, 01:15 PM
        2 responses
        6 views
        0 likes
        Last Post NRITV
        by NRITV
         
        Started by frankthearm, Today, 09:08 AM
        7 responses
        30 views
        0 likes
        Last Post NinjaTrader_Clayton  
        Started by maybeimnotrader, Yesterday, 05:46 PM
        5 responses
        25 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by quantismo, Yesterday, 05:13 PM
        2 responses
        18 views
        0 likes
        Last Post quantismo  
        Started by adeelshahzad, Today, 03:54 AM
        5 responses
        33 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Working...
        X