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

Volumetric Script Primary Dataseries

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

    Volumetric Script Primary Dataseries

    Hello,

    first of all Happy New Year to everyone!

    I want to ask when one needs volumetric 1min in a script strategy and the strategy is enabled in a chart with volumetric dataseries 1 Minute as primary dataseries with having bidask from the 1 min volumetric plotted in the cahrt then one does not need to have Addvolumetric in State.Configure and its OK having in Onbarupdate
    NinjaTrader.NinjaScript.BarsTypes.VolumetricBarsTy pe barsType = Bars.BarsSeries.BarsType as
    NinjaTrader.NinjaScript.BarsTypes.VolumetricBarsTy pe;
    if (barsType == null)
    return;

    Only if another dataseries eg volumetric 400 Ticks would be needed in the code then this has to be added with Addvolumetric(..Tick, 400..) and
    NinjaTrader.NinjaScript.BarsTypes.VolumetricBarsTy pe barsType1 = BarsArray[1].BarsSeries.BarsType as
    NinjaTrader.NinjaScript.BarsTypes.VolumetricBarsTy pe;
    if (barsType1 == null)
    return;

    Is my understanding correct?

    Thank you!
    Tony

    #2
    Hello Tony,

    Yes, this would be correct. If the volumetric series is added with AddVolumetric, this would be BarsArray[1] and this would be used for the cast.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hello,

      thank you for your reply. How can I work with volumetric-UpDownTick (instead of bidask) in a scriptcode please. I didnt see in the helpguide. Sorry, if I missed it!

      Eg for getting the number/sum of UpDownTicks on the high at "askside"

      Thank you!
      Tony

      Comment


        #4
        Hello Tony,

        Use VolumetricDetlaType.UpDownTick as stated in the help guide.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Oh, didnt see it!

          Thank you!

          Comment


            #6
            Hello,

            for understanding correctly: when running the script-strategy in a chart with volumetric-updowntick and therefore in state.configure I do not have addvolumetric but only necessary in onbarupdate NinjaTrader.NinjaScript.BarsTypes.VolumetricBarsTy pe barsType = Bars.BarsSeries.BarsType as
            NinjaTrader.NinjaScript.BarsTypes.VolumetricBarsTy pe;
            if (barsType == null)
            return;

            then eg "barsType.Volumes[CurrentBars[0]].GetAskVolumeForPrice(Highs[0][0])" will give from the right-side on high of bar the "ask-number" from updowntick and not the ask-number from "bidask"?

            Thank you!
            Tony

            Comment


              #7
              Hello Tony,

              When using AddVolumetric() with VolumetricDetlaType.UpDownTick, this changes how the delta is calculated.

              From the help guide:
              "Sets how the delta is calculated for buy / sell aggressor classification. Possible values are:
              BidAsk or UpDownTick.

              BidAsk - Accumulates the volume of orders filled at the bid or less vs ask or more. Orders filled at the ask or more price are considered buying pressure. Orders filled at the bid or less price are considered selling pressure. If the current tick price is between ask and bid, the volume will be recorded to the same pressure as the previous tick.

              UpDownTick - Accumulates the volume of up ticks vs down ticks. Up ticks are considered buying pressure. Down ticks are considered selling pressure. If the current tick price is the same as the previous tick price, the volume will be recorded to the same pressure as the previous tick."
              Chelsea B.NinjaTrader Customer Service

              Comment


                #8
                Hello,

                we are not talking about the same thing. I asked before if in a scriptstrategy it is necessary to addvolumetric when the script runs in a chart with volumetric dataseries. The reply I got is that it is not necessary to addvolumetric. In this concernt my question then was when the chart dataseries is volumetric with updowntick if then in the script the code uses this volumetric updowntick. There is no Addvolumetric. If it is necessary then I will do of course, but before running not necessary dataseries by adding to a code I want to know if it is necessary to add.

                Thank you!
                Tony

                Comment


                  #9
                  Hello Tony,

                  Thank you for clarifying. I was not understanding this from your first post.

                  BarsArray[1] is a secondary series. If you are using Volumetrics on the chart that would be BarsArray[0].
                  If you want to add volumetric to the script as a secondary series use AddVolumetric() to add a secondary volumetric series.

                  BarsArray[0], or the primary series, will have whatever properties you set in the Data Series from the chart.
                  Chelsea B.NinjaTrader Customer Service

                  Comment


                    #10
                    Hello,

                    thank you for your reply. Your last sentence is the reply to the question.

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by jeronymite, 04-12-2024, 04:26 PM
                    3 responses
                    39 views
                    0 likes
                    Last Post jeronymite  
                    Started by bill2023, Today, 08:51 AM
                    2 responses
                    15 views
                    0 likes
                    Last Post bill2023  
                    Started by sidlercom80, 10-28-2023, 08:49 AM
                    167 responses
                    2,260 views
                    0 likes
                    Last Post jeronymite  
                    Started by warreng86, 11-10-2020, 02:04 PM
                    7 responses
                    1,362 views
                    0 likes
                    Last Post NinjaTrader_Manfred  
                    Started by Perr0Grande, Today, 08:16 PM
                    0 responses
                    5 views
                    0 likes
                    Last Post Perr0Grande  
                    Working...
                    X