Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Entry price of ES is not by tick. Is there a way to work around it?

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

    Entry price of ES is not by tick. Is there a way to work around it?

    Hi,

    I wrote some codes to sum up daily realized profit.

    Code:
            foreach (Trade i in Signals)
            {
                if (ToDay(i.Entry.Time)==BarDate)
                {
                    DailyPnL = DailyPnL + i.ProfitPoints;
            PrintWithTimeStamp(Convert.ToString(i.ProfitPoints));
            PrintWithTimeStamp(Convert.ToString(i.Entry.Price));
    
                }
    And I found that the ProfitPoints are not in ticks. Then I chased and found that it is caused by entry price of the trade. Like the entry price below, entry price is a long number. This is in practice not possible.

    5/21/2012 09:59:56 1296.10453342885

    Is there a work around of this, so that I get more realistic entry price in back testing?

    #2
    Hello,

    If you are scaling in or out of your strategy, your avg price may be reported in this manner.

    However you can use Round2TickSize in your strategy logic to get the closest tick value of the instrument you are trading.

    MatthewNinjaTrader Product Management

    Comment


      #3
      Originally posted by NinjaTrader_Matthew View Post
      Hello,

      If you are scaling in or out of your strategy, your avg price may be reported in this manner.

      However you can use Round2TickSize in your strategy logic to get the closest tick value of the instrument you are trading.

      http://www.ninjatrader.com/support/h...trument_ro.htm
      I used the following statement to enter. It does generate a limit price of non-rounded number:

      Code:
      EnterLongLimit(DefaultQuantity, Bollinger(2.5, 14).Upper[0], "abc");
      does this non-rounded to tick limit order mess up execution in real live? I have not reached there yet so hope that you can share experience about it.


      also, There is only MasterInstrument.RoundPrice(price, increment) in my NT7, no Round2TickSize function. My NT7's version is 7.0.1000.10. Is that a problem? I can't find reference on what "increment" should be. Could you advise what I should fill in?

      Comment


        #4
        Hello leontancfa,
        Thanks for your post and I am replying for Matthew.

        The unsupported Round2TickSize is not broken in version 7.0.1000.10. Please use the below code to round to ticksize
        Code:
        Instrument.MasterInstrument.Round2TickSize(price);
        Please let me know if I can assist you any further.
        JoydeepNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        648 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        369 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        109 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        573 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        575 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X