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

Order not placed

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

    Order not placed

    Hi -

    I am developing a strategy to initially take off half of its position after a defined price target and then use a trailing stop to continue with the second half of position using the managed approach. I am using two separate entry orders (one order for each half of position) with two different fromEntrySignal names as follows:

    public Order Order1;
    public Order Order2;

    Order1 = strategy.EnterShort("Order1");
    Order2 = strategy.EnterShort("Order2");

    Order1 is placed as expected and Order2 in not placed (returning null.)

    The engine reports the following error:

    FromEntrySignal='' Reason='Exceeded entry signals limit based on EntryHandling and EntriesPerDirection properties'

    I have a maximum of two working orders for the same asset per strategy at a time. Each with different FromEntrySignalNames.

    I have set EntriesPerDirection = 5 and EntryHandling = EntryHandling.AllEntries;


    Are there other parameters or factors that I must also be setting?

    Thank you for your help.











    #2
    Hello kweiss,

    After changing EntriesPerDirection and EntryHandling have you removed and re-added an instance of the script?
    If these are set in State.SetDefaults, the defaults are only pulled when adding a new instance of the script.

    Enable TraceOrders, as this will tell you if and why an order is ignored, rejected, or automatically cancelled.

    Print the values on the condition along with the time of the bar to ensure the conditions are evaluating as true.


    Save the output to a text file, by right-clicking the output window and selecting Save As.

    I am happy to assist with analyzing the output.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Closing Strategy Analyzer and reopening it fixed the problem.

      Thanks for your help.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by andrewtrades, Today, 04:57 PM
      1 response
      7 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Started by chbruno, Today, 04:10 PM
      0 responses
      5 views
      0 likes
      Last Post chbruno
      by chbruno
       
      Started by josh18955, 03-25-2023, 11:16 AM
      6 responses
      436 views
      0 likes
      Last Post Delerium  
      Started by FAQtrader, Today, 03:35 PM
      0 responses
      7 views
      0 likes
      Last Post FAQtrader  
      Started by rocketman7, Today, 09:41 AM
      5 responses
      19 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Working...
      X