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%
      Chelsea B.NinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by kempotrader, Today, 08:56 AM
      0 responses
      6 views
      0 likes
      Last Post kempotrader  
      Started by kempotrader, Today, 08:54 AM
      0 responses
      4 views
      0 likes
      Last Post kempotrader  
      Started by mmenigma, Today, 08:54 AM
      0 responses
      2 views
      0 likes
      Last Post mmenigma  
      Started by halgo_boulder, Today, 08:44 AM
      0 responses
      1 view
      0 likes
      Last Post halgo_boulder  
      Started by drewski1980, Today, 08:24 AM
      0 responses
      4 views
      0 likes
      Last Post drewski1980  
      Working...
      X