• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

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 Vincere, Today, 04:38 AM
            0 responses
            2 views
            0 likes
            Last Post Vincere
            by Vincere
             
            Started by trader_rick, Today, 04:02 AM
            1 response
            3 views
            0 likes
            Last Post NinjaTrader_ChrisSch  
            Started by percma, Today, 02:51 AM
            0 responses
            5 views
            0 likes
            Last Post percma
            by percma
             
            Started by Abilene, Today, 01:27 AM
            0 responses
            15 views
            0 likes
            Last Post Abilene
            by Abilene
             
            Started by simjs, Yesterday, 08:11 PM
            1 response
            5 views
            0 likes
            Last Post NinjaTrader_ChrisSch  
            Working...
            X