Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

PriceType and Tick Values

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

    PriceType and Tick Values

    Hi,

    I am trying to get my head around this and I am going in circles. If someone could please clarify this for me I would appreciate it.

    I have an indicator that I wish to run on each incoming tick. In my indicator I have statements such as

    if(High[0] > previousHigh)
    { ... }

    if(Low[0] > previousLow)
    { ... }

    This works fine when CalculateOnBarClose = true. If, however, CalculateBarOnClose = false, does an inccoming tick have a defined open, high, low, close value and is High[0}, Low[0] defined for each incoming tick? They would all be the same value. Also, does it matter if I set PriceTypeSupported = false in this case? How should I set PriceTypeSupported? Please advise. Thank you.

    #2
    Zeos,

    When COBC = false and you reference High[0], Low[0], etc, then it's going to refer to those values for the bar currently forming. COBC = false tells it to process logic tick by tick, but all value indexes you refer to are based on bars.

    PriceTypeSupported is used when you want the user to be able to select a price value used to calculate when none is explicitly specified or you use Input[0].
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Hi Ryan,

      So if I understand you correctly, when COBC = false, the bar forming has welll defined OHLC values. Also, if PriceTypeSupported is not specified in the program, what is its default value, true or false? Thank you.

      Comment


        #4
        Yes, you're referring to the last bar, not the last tick.

        If you are hard coding value like High[0], Low[0] then PriceTypeSupported is not relevant for you. - It's best to simply not use it.
        Ryan M.NinjaTrader Customer Service

        Comment


          #5
          OK Thank you Ryan. Much appreciated.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by CarlTrading, 03-31-2026, 09:41 PM
          1 response
          152 views
          1 like
          Last Post NinjaTrader_ChelseaB  
          Started by CarlTrading, 04-01-2026, 02:41 AM
          0 responses
          87 views
          1 like
          Last Post CarlTrading  
          Started by CaptainJack, 03-31-2026, 11:44 PM
          0 responses
          131 views
          2 likes
          Last Post CaptainJack  
          Started by CarlTrading, 03-30-2026, 11:51 AM
          0 responses
          127 views
          1 like
          Last Post CarlTrading  
          Started by CarlTrading, 03-30-2026, 11:48 AM
          0 responses
          106 views
          0 likes
          Last Post CarlTrading  
          Working...
          X