Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Accessing entry efficiency data by code

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

    Accessing entry efficiency data by code

    Is there a method to access entry efficiency calculations by code or can anyone suggested a good method to calculate entry efficiency in particular?



    Specifically, I'm trying to find all the instances my entry limit orders execute at the move extreme (to the tick) when 'liberal' fill processing is employed.

    #2
    Hello nrgtrader,

    I am unsure of anyway to gather this specific information from a script as the script is not directly associated with the Account Performance tab and its calculations. You could calculate this value with the script its self using the order information and execution information while it runs. You can see the calculation used by the account perfomance tab in the link you provided, this type of equation could be used in your script as well to calculate this value.


    I look forward to being of further assistance.

    Comment


      #3
      NinjaTrader_Jesse I am trying to find entries that hit to the tick and am having trouble with this code. Bellow is the code (and output) in onorderupdate and for some reason the matching print is not hitting. What am I doing wrong?

      1/26/2017 10:00:29 AM entryPrice = 53.64
      1/26/2017 10:00:29 AM minLow = 53.64
      1/26/2017 10:00:29 AM maxHigh = 54.06


      else if (order.OrderType == OrderType.Limit && order.OrderState == OrderState.Filled)
      {
      int tradeSpanL = 1 + BarsSinceEntry(bIPindex,"Long limit entry", 0);
      int tradeSpanS = 1 + BarsSinceEntry(bIPindex,"Short limit entry", 0);
      double minLow = MIN(Low, tradeSpanL)[0];
      double maxHigh = MAX(High, tradeSpanS)[0];

      Print(Time[0].ToString() + " entryPrice = " + entryPrice);
      Print(Time[0].ToString() + " minLow = " + minLow);
      Print(Time[0].ToString() + " maxHigh = " + maxHigh);

      if (entryPrice == minLow || entryPrice == maxHigh )
      {
      Print(Time[0].ToString() + " Position entered at move min/max");
      }

      Comment


        #4
        Hello,

        Are you saying that the condition below is not occurring?

        Code:
        if (entryPrice == minLow || entryPrice == maxHigh )
        {
        Print(Time[0].ToString() + " Position entered at move min/max");
        }
        If so you may be running into floating point comparison problems, we have a guide here on that subject: http://ninjatrader.com/support/forum...ead.php?t=3929

        I look forward to being of further assistance.

        Comment


          #5
          That's it -- thank you!

          Comment


            #6
            Hello nrgtrader,

            Thank you for your response.

            Are you indicating this item is resolved or that Jesse correctly identified the matter and you will need a follow up on his post?

            I look forward to your response.

            Comment


              #7
              NinjaTrader_PatrickH, I believe NinjaTrader_Jesse did resolve my question regarding my code with respect to floating point comparison problems and also my initial question regarding accessibility of entry efficiency data. Thanks.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
              0 responses
              558 views
              0 likes
              Last Post Geovanny Suaza  
              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
              0 responses
              324 views
              1 like
              Last Post Geovanny Suaza  
              Started by Mindset, 02-09-2026, 11:44 AM
              0 responses
              101 views
              0 likes
              Last Post Mindset
              by Mindset
               
              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
              0 responses
              545 views
              1 like
              Last Post Geovanny Suaza  
              Started by RFrosty, 01-28-2026, 06:49 PM
              0 responses
              547 views
              1 like
              Last Post RFrosty
              by RFrosty
               
              Working...
              X