Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Problem with Entries per direction

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

    Problem with Entries per direction

    Hi
    Before backtesting a very simple system I've set Entries per direction to "1" and Entry Handling to "AllEntries". Besides this, there is only one Entry rule "EnterShortLimit". But sometimes there are 2 Short positions entered.
    How can this be possible?

    #2
    We will need to see exact code and exactly what you see on your end. Please provide a screenshot of the results. Thank you.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      I modified the code and could solve this problem, but don't know exactly why...

      But when I modify the order type to "EnterShortLimit" and add another order "EnterLongLimit" for long positions, only short positions are entered, no any long position.

      The complete code is attached.

      Please could you tell me, what's wrong with this code??
      Thank you in advance
      Attached Files

      Comment


        #4
        You're likely running into the Internal Order Handling Rules with the approach - http://www.ninjatrader-support.com/H...verview36.html

        I would suggest you add TraceOrders = true in the Initialize() and then open the output window while running your strategy to debug the order behavior you expierence.

        BertrandNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by andrewtrades, Today, 04:57 PM
        1 response
        8 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Started by chbruno, Today, 04:10 PM
        0 responses
        6 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