Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 habeebft, Today, 07:27 AM
          1 response
          11 views
          0 likes
          Last Post NinjaTrader_ChristopherS  
          Started by AveryFlynn, Today, 04:57 AM
          1 response
          11 views
          0 likes
          Last Post NinjaTrader_Erick  
          Started by Max238, Today, 01:28 AM
          4 responses
          37 views
          0 likes
          Last Post Max238
          by Max238
           
          Started by r68cervera, Today, 05:29 AM
          1 response
          9 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by geddyisodin, Today, 05:20 AM
          1 response
          11 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Working...
          X