Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Ticks and Prices and Offsets

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

    Ticks and Prices and Offsets

    Hello,

    Can you tell me, is it possible for NinjaScript code to know how many decimal places are in the price of an instrument?

    And what the tick value is?

    Example: If I have a general strategy or indicator and I want to input a parm value that indicates a tick offset to the price. The offset is an integer.

    But, in order to apply the offset to an instruments price, I need to know the tick precision (decimal places) and the value of each tick.

    So, to add 5 ticks to the FDAX, for example, the price would move 2.5 cents, because each tick is worth .5 cents.

    Look at 6J...with all those decimal places.

    Perhaps another way to ask this...is how to add a certain number of ticks to a price to come up with the new price? Is there an easy way?

    New Price = Old Price + (tick-offset * value per tick)?? thinking out loud.

    Or, am I missing something? (newbie)

    Thanks

    #2
    Hi Turtle Trader,

    You can access the tick size with "TickSize", and multiply it as needed.

    More info at - http://www.ninjatrader-support.com/H....html?TickSize
    TimNinjaTrader Customer Service

    Comment


      #3
      reply

      perfect!

      that will work.

      Comment


        #4
        ticksize not in context

        I"m trying to accress ticksize in OnBarUpdate()

        and get the message "The name 'ticksize' does not exist in the current context"
        -----------------------------------------------

        code:

        double tx;
        tx = ticksize + 0;

        --------------------------------------------

        please advise.

        Comment


          #5
          Hi Turtle Trader,

          The correct syntax is "TickSize" without the quotations.

          Like all C# code, it is case sensitive.
          TimNinjaTrader Customer Service

          Comment


            #6
            que tonto!

            you're right...thanks

            never coded C or C# before...

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            571 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            330 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
            548 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            549 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X