Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

A question about the precision of Offset in Condition Builder

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

    A question about the precision of Offset in Condition Builder

    Hi Help Support team,

    I have a quick question about the precision of Offset field in Condition Builder.

    In this page https://ninjatrader.com/support/help...setAnItemValue, I tried to set "Percent" as "Offset type" and use "0.995" and "1.005" for the "Offset" values in my settings. However, when the alert runs in real world, I notice that the alerts got triggered at 99% and 101% rather than 99.5% and 100.5%.

    This makes me wonder does NinjaTrader8 internally round up & down the Offset value? May I know what's the precision of the variable?

    Thanks.

    #2
    Hello awesomeu,

    From my understanding the accuracy is within two decimal places of a price.

    I will do some testing and I will let you know what I find. I appreciate your patience.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hello awesomeu,

      The percent is multiplied by the series value, and you can view this in the code.

      I'm showing that the values are calculated correctly.

      Keep in mind for:
      5% use 0.05
      50% use 0.5
      500% use 5.0

      Below is a link to a video showing prints of the price with an offset of .995 for 99.5%
      https://drive.google.com/file/d/1aG2...w?usp=drivesdk
      Chelsea B.NinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Jeremytang, 07-14-2018, 06:45 PM
      21 responses
      439 views
      0 likes
      Last Post mav8rick  
      Started by LeonK, Yesterday, 09:26 PM
      1 response
      8 views
      0 likes
      Last Post bltdavid  
      Started by NicholasJoannette, Yesterday, 03:01 PM
      2 responses
      11 views
      0 likes
      Last Post NicholasJoannette  
      Started by rach1994, Yesterday, 12:20 PM
      1 response
      35 views
      0 likes
      Last Post bltdavid  
      Started by litamm89, Yesterday, 11:00 AM
      5 responses
      22 views
      1 like
      Last Post rafael_delima86  
      Working...
      X