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

Changing color to a Volume Bar depending on volume

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

    Changing color to a Volume Bar depending on volume

    Hi there!

    Is there any way to add a property to VOL indicator that could change the colour of a bar if the volume is greater or equal a certain volume?

    For example, if volume is greater or equal to 4000, I want the bar of this volume to be coloured on RED.

    Any help?

    #2
    Hello dylan29,

    Thanks for your post and welcome to the NinjaTrader forums!

    It is possible to create this, however, it would involve creating a custom coded indicator.

    The standard VOL indicator is locked and cannot be changed. You are welcome to make a copy of the indicator and in its code, you can add conditional code that will color the bar based on conditions you configure. You can add a property to select the value of volume at which to color the bar as well as a property to select the color of the bar.

    If you would like to create this yourself, we can provide you with links to get you started in Ninjascript which is based on C# programming language.

    Alternatively, if you would like it created for you, we can provide links to 3rd party developers.

    Also, while it does not provide specifically what you are looking for, here is an example of coloring the volume bars and may be of interest to you: https://ninjatrader.com/support/foru...d=7&linkid=681
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Thanks for the reply!,

      I would appreciate if you could bring me some guidance on how to clone the VOL indicator and tweak the code to colour the bar based on a certain volume.

      Thanks again!

      Comment


        #4
        Hello dylan29,

        Thanks for your reply.

        To copy a script, go to New>Ninjascript editor. In the Ninjascript explorer panel, double left click on the indicators folder. Locate the indicator VOL and double left click on it to open the script. In the text of the script, right mouse click and select "Save as..." and provide a new name for the indicator (such as "myVol") and click OK. This will create the copy and now you can directly edit the script (as the editor replaced the VOL script with your newly copied script).

        To change the color of the plot on a conditional basis you would use PlotBrushes, here is a link with example to PlotBrushes: https://ninjatrader.com/support/help...lotbrushes.htm

        Please let us know if you need the "links to get you started in Ninjascript which is based on C# programming language."
        Paul H.NinjaTrader Customer Service

        Comment


          #5
          Yes, please, send me those links.

          Thanks in advance

          Comment


            #6
            Hello dylan29,

            Thanks for your reply.

            All links below are publicly available.

            If you are new to C#, to get a basic foundation for the concepts and syntax used in NinjaScript I would recommend this section of articles in our NT7 help guide first:https://ninjatrader.com/support/help...g_concepts.htm

            Here is a link to the Educational Resources section of the NT8 Help Guide to help you get started with NinjaScript:https://ninjatrader.com/support/help..._resources.htm

            The entire Alphabetical Reference can be found with the following link: https://ninjatrader.com/support/help..._reference.htm

            Below are links to Reference Samples online as well as some Tips and Tricks for both indicators and strategies. These samples can be downloaded, installed and modified from NinjaTrader and hopefully serve as a good base for your custom works.

            Click here to see our NinjaScript Reference Samples: https://ninjatrader.com/support/foru...splay.php?f=30

            Click here to see our NinjaScript Tips: https://ninjatrader.com/support/foru...splay.php?f=31

            I'm also proving a link to a pre-recorded set of video of "NinjaScript Editor 401" for you to view at your own convenience. NinjaScript Editor 401 - https://www.youtube.com/watch?v=BA0W...We0Nf&index=12

            There is also a growing library of user-submitted custom indicators (100+) that can be downloaded from our support forum: http://www.ninjatrader.com/support/f...splay.php?f=37

            Last, I'm also sharing a link to another forum post that reviews how to use prints to understand behavior and debug a script when the behavior is unexpected. http://ninjatrader.com/support/forum...979#post510979
            Paul H.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by GwFutures1988, Today, 02:48 PM
            1 response
            5 views
            0 likes
            Last Post NinjaTrader_Clayton  
            Started by ScottWalsh, 04-16-2024, 04:29 PM
            6 responses
            30 views
            0 likes
            Last Post ScottWalsh  
            Started by frankthearm, Today, 09:08 AM
            10 responses
            36 views
            0 likes
            Last Post frankthearm  
            Started by mmenigma, Today, 02:22 PM
            1 response
            3 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Started by NRITV, Today, 01:15 PM
            2 responses
            9 views
            0 likes
            Last Post NRITV
            by NRITV
             
            Working...
            X