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

AddVolumetric TickPerLevel

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

    AddVolumetric TickPerLevel

    I am using a secondary series 15 minute volumetric bar

    When adding the volumetric there is a parameter for ticks per level

    AddVolumetric(string instrumentName, Data.BarsPeriodType baseBarsPeriodType, int baseBarsPeriodTypeValue, Data.VolumetricDeltaType deltaType, int tickPerLevel)

    I want to have this set to 8 ticks but if I try to return a value for delta I return zero.
    GetDeltaForPrice(double price)
    If I set to one tick I return the proper value. I am assuming it is returning zero when set to 8 ticks is because this is trying to return a value for a specific price level as opposed to a span of prices.

    I would like to return the sum of delta for 8 ticks surrounding the Close[0] price.
    Do I have to manually sum the 8 ticks?


    On a second note when I set TickPerLevel to 1 for a 15 minute bar I cannot visually see all the price levels on the chart, they are too small to read. When I stretch the screen many of the price levels go out of view. See attached

    I am trying to verify the strategy is returning the correct delta at the corresponding price level. Is there a way to scroll the chart so I can read all the price levels?



    Attached Files

    #2
    Hello sdauteuil,

    Thank you for your question on this.

    I'm investigating further on my end and will have an answer for you shortly.

    I appreciate your patience.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Thank you appreciate the effort

      One more question

      CurrentBar is an index what is the proper syntax to access previous bars?

      Print("Total Volume: " + barsType.Volumes[CurrentBar].TotalVolume);

      Comment


        #4
        Hello sdauteuil,

        [CurrentBar - 1] would be the previous bar.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Hello sdauteuil,

          We were able to reproduce and have reported to our development.

          This behavior where using TicksPerLevel greater than 1 with AddVolumetric is producing incorrect results is being tracked with ID# NTEIGHT-14899.

          As new releases of NinjaTrader become available, please check the release notes for this ID.


          Once listed, please test for the behavior and confirm it has been corrected.
          Chelsea B.NinjaTrader Customer Service

          Comment


            #6
            Hello sdauteuil,

            Including TicksPerLevel from BarsPeriod.Value with the loop will give the expected output.

            for (double rowPrice = Low[0]; rowPrice <= High[0]; rowPrice += TickSize * BarsPeriod.Value)
            Chelsea B.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by r68cervera, Today, 05:29 AM
            0 responses
            3 views
            0 likes
            Last Post r68cervera  
            Started by geddyisodin, Today, 05:20 AM
            0 responses
            4 views
            0 likes
            Last Post geddyisodin  
            Started by JonesJoker, 04-22-2024, 12:23 PM
            6 responses
            35 views
            0 likes
            Last Post JonesJoker  
            Started by GussJ, 03-04-2020, 03:11 PM
            12 responses
            3,240 views
            0 likes
            Last Post Leafcutter  
            Started by AveryFlynn, Today, 04:57 AM
            0 responses
            7 views
            0 likes
            Last Post AveryFlynn  
            Working...
            X