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

Indicator for point of control notch on each bar for tick charts

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

    Indicator for point of control notch on each bar for tick charts

    Is there an indicator that shows where the highest volume was traded in each bar?

    In NT8, volumetric dataseries has an option to show it (see screenshot). Is it possible to see this type of notch on tick charts?

    On volumetric data, the option is "Show maximum" and "Show volume". I basically just want the "Show maximum", but on a tick dataseries.

    I've already tried overlaying the volumetric dataseries on top of the tick chart, and setting color to transparent for everything except the volume maximum. This works, except it creates a very wide gap between all of the bars, which I can't figure out how to decrease the width.

    Attached Files

    #2
    Hello backtester831,

    Thanks for your post.

    You can check our User App Share for free indicators, but I when I checked I did not see one that accomplishes this specific goal. Volumetric Bars and the associated ChartStyle have different spacing so overlaying the Volumetric bars so the "Show Volume" notch may not be the way to accomplish the goal.



    The NinjaTrader Ecosystem website is for educational and informational purposes only and should not be considered a solicitation to buy or sell a futures contract or make any other type of investment decision. The add-ons listed on this website are not to be considered a recommendation and it is the reader's responsibility to evaluate any product, service, or company. NinjaTrader Ecosystem LLC is not responsible for the accuracy or content of any product, service or company linked to on this website.

    The Indicator Development forum is dedicated to NinjaScript developers to ask questions about building scripts. Questions involving using the existing tools and charting related questions are best directed to our Platform Technical Support forum. Are you a programmer interested in writing an indicator that accomplishes this goal? If so we could give some further direction.

    If you are interested in services to have this kind of script built for you, we can have a colleague reach out with additional information on NinjaScript Consultants who would be happy to build this sort of indicator at your request.

    We look forward to assisting.
    JimNinjaTrader Customer Service

    Comment


      #3
      Hello backtester831,

      I would suggest testing the sample code in the Help Guide to observe the prints and confirm that the Output window displays what you would like to use in for the indicator.

      I have taken the liberty of placing the Help Guide code in an indicator that adds a Volumetric data series, and then prints out Bid/Ask/Combined for GetMaximumValue().

      You can then add a plot with AddPlot, and if you use a PlotStyle of Hash, you can have a notch displayed on the bar at that price level.

      Information on adding plots and assigning values can be found below. You can also use a New Indicator Wizard to create an indicator template that adds a plot with the Hash PlotSyle.

      AddPlot - https://ninjatrader.com/support/help...8/?addplot.htm

      AddVolumetric - https://ninjatrader.com/support/help...volumetric.htm

      New NinjaScript Wizards - https://ninjatrader.com/support/help.../ns_wizard.htm

      Let us know if we can be of further assistance.
      Attached Files
      JimNinjaTrader Customer Service

      Comment


        #4
        Thank you sharing your file.
        I have question related to Volume. I want to add condition in my strategy which checks to see if there is a Volume Spike on the current bar in comparison to last 5 bars. Can someone please help me with this. I am currently using NT8 latest version.

        My current condition in my strategy is something like this:

        if(Volume[1]>MAX(Volume,5)[2])
        Print("Volume is spike found".)
        Last edited by bjunaid; 07-30-2020, 04:00 PM.

        Comment


          #5
          Welcome to the forums bjunaid!

          You are on the right track with your code.

          Your condition is checking if the Volume of the last bar is greater than the highest volume from the last 5 bars, looking this maximum volume from 2 bars ago.

          You could consider checking if the Volume of the bar being processed in your logic (Volume[0]) is greater than or equal to the maximum volume of the last 5 bars, looking back 0 bars, and this will tell you that the current volume is the highest from 5 bars.

          I.E.

          if (Volume[0] >= MAX(Volume, 5)[0])

          You could also check if Volume[0] is greater than the maximum volume from previous bars + an offset.

          I.E.

          if (Volume[0] > MAX(Volume, 5)[1] + YourOffsetVariable)

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

          When designing logic, I recommend using debugging prints so you can check and see the values that are used to evaluate your conditions and so you can check your work.

          Debugging Tips - https://ninjatrader.com/support/help...script_cod.htm

          We look forward to assisting.
          JimNinjaTrader Customer Service

          Comment


            #6
            Hi Jim,

            Thanks for you reply.

            I tried this code, my code compiles fine however I am getting an error in the Log?
            STtest101: Error on calling 'OnBarUpdate' method on bar 115: Object reference not set to an instance of an object.

            I am not where in the strategy code this statement should be added.

            Thanks,

            Comment


              #7
              Hello bjunaid,

              This is where you will need to use debugging prints to see which line is throwing the error. Please add prints throughout your OnBarUpdate method and test to reproduce the issue so you can see which line of code is throwing the error.

              The error is telling you something is null when that line is reached, so please then check to see which object is null at that time.

              Checking for null references - https://ninjatrader.com/support/help...references.htm

              We look forward to assisting.
              JimNinjaTrader Customer Service

              Comment


                #8
                Thank for the reply. I was able to get this work using the print debug method.

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by wuannetraam, Today, 02:40 AM
                2 responses
                24 views
                0 likes
                Last Post wuannetraam  
                Started by sdauteuil, 09-23-2021, 10:16 AM
                5 responses
                1,220 views
                0 likes
                Last Post NinjaTrader_RyanS  
                Started by Ludwik, Today, 03:52 AM
                6 responses
                31 views
                0 likes
                Last Post Ludwik
                by Ludwik
                 
                Started by jjs12, Today, 10:29 AM
                1 response
                5 views
                0 likes
                Last Post NinjaTrader_ChristopherJ  
                Started by lakman184, 03-24-2024, 01:30 PM
                5 responses
                28 views
                0 likes
                Last Post NinjaTrader_Jesse  
                Working...
                X