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 CarlTrading, 03-31-2026, 09:41 PM
      1 response
      41 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      20 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      28 views
      1 like
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      45 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      37 views
      0 likes
      Last Post CarlTrading  
      Working...
      X