Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Get half tick

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

    Get half tick

    Hi there
    I am using ninja trader 8. Is there any way to get 1 and half tick in an instrument? for example i want to know if the price is above a constant value for 1 and half of tick or less than a constant value for 3 quarter of a tick.

    #2
    Hello amiralimadadi,

    Thanks for your inquiry.

    TickSize can be used to get instruments tick value. If I am understanding your inquiry correctly, you could perform math similar to the following: MyConst * (1.5 * TickSize) and compare against a Price Series.

    Publicly available documentation can be found below.

    TickSize - https://ninjatrader.com/support/help.../?ticksize.htm

    Price Series - https://ninjatrader.com/support/help...ice_series.htm

    Please let us know if we can be of further assistance.

    Comment


      #3
      I guess i could not explain the problem well.
      Suppose that you have a series and the strategy tells you that if the price is upper than a value (for example 114.4123) for 2 ticks, you should enter trade. It's OK. In OnBarUpdate you can check Close[0] and Close[1] and if they both are upper than that value you enter the trade.

      But my strategy says that if the price is upper than a value for 1.5 tick, enter the trade. I want to know how to catch 0.5 tick? Is OnBarUpdate a good event for this? Should i change the event ? or anything else.

      thank you and sorry for long question

      Comment


        #4
        Isn't there anybody who know the answer? It is important to me

        Comment


          #5
          Hello amiralimadadi,

          Ticks are the smallest amount of market movement and OnBarUpdate() is event based rather than being time based. We could not wait for one and a half ticks to pass, because OnBarUpdate() will only update with as ticks come in, and we cannot see "half ticks."

          If you are looking for time based events that can happen at your own interval, you could add a timer and attach your own event handler with TriggerCustomEvent() to handle your own time based events. An example implementing a timer with an event handler and TriggerCustomEnevt() can be found below. Please also the reference the associated documentation with this sample for a complete understanding.

          SampleCustomEvent - https://ninjatrader.com/support/foru...ead.php?t=5965

          Please let us know if you have any questions.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by NullPointStrategies, Yesterday, 05:17 AM
          0 responses
          59 views
          0 likes
          Last Post NullPointStrategies  
          Started by argusthome, 03-08-2026, 10:06 AM
          0 responses
          133 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          73 views
          0 likes
          Last Post NabilKhattabi  
          Started by Deep42, 03-06-2026, 12:28 AM
          0 responses
          45 views
          0 likes
          Last Post Deep42
          by Deep42
           
          Started by TheRealMorford, 03-05-2026, 06:15 PM
          0 responses
          50 views
          0 likes
          Last Post TheRealMorford  
          Working...
          X