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

NT7 Volume Based Color

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

    NT7 Volume Based Color

    Does anyhow have an NT7 version of the VolumeBasedColor indicator?
    Volume bars where a bar with a larger volume than previous has a different color. The one for NT6.5 does not reload properly once a higher volume is reached.

    Seems like something simple a programmer can fix.

    Thanks,
    Trading618

    #2
    Hello Trading618,

    Thank you for your post.

    The indicator logic should work the same for version 6.5 and vesion 7.

    What might be causing issues is if you had overwriten the NinjaTrader 7 @vol.cs file with the one from the file.

    I have exported this file for you in version 7 and attached in a post. This will include the right system volume file.

    Import using File > Utilities > Import NinjaScript.

    With this file be sure to answer yes to any overwrite prompts.
    Attached Files
    Last edited by NinjaTrader_RyanM1; 05-11-2010, 02:40 PM. Reason: Replaced File
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Thanks Ryan but I am having the same issue. I deleted the original VolumeBasedColor file, restarted NT and then installed your new file but I have the same issue.

      Once the volume exceeds the previous volume it builds the different colored bar on top of the previous color.

      If I refresh the scrip it fixes it, but i have to do this every time.

      Comment


        #4
        The code has a bug. If you use this in CalculateOnBarClose = "False", every new bar will first have a smaller volume than the previous bar. So it will first set VolDown and show the associated color. Once the volume exceeds the volume of the prior bar, the code sets VolUp.

        But now you have a problem, because VolDown is still set. At this stage you need to set VolDown to 0! So the correct code would be:

        if (CurrentBar < 1)
        return;
        if(Volume[0] < Volume[1])
        {
        VOLUp.Set(0);
        VOLDown.Set(Volume[0]);
        }
        else
        {
        VOLUp.Set(Volume[0]);
        VOLDown.Set(0);
        }

        and now your indicator should work with CalculateOnBarClose = False as well.

        Comment


          #5
          Yes, Harry's assessment is correct and should work.

          As an alternative I have written this using the version 7 approach for multi colored plots. I have updated my previous post with this new file.

          This indicator will only work in version 7.
          Attached Files
          Ryan M.NinjaTrader Customer Service

          Comment


            #6
            Excellent! It works. Thanks Harry and Ryan!

            Comment


              #7
              Hello again,

              How do you reinstall an indicator. I want to change the colors of the volume based color indicator but they are stuck at my old preset colors. I have tried deleting the indicator under 'bin-custom-indicator' but it still shows up in my indicator window (restarted NT). I also tried editing the word doc to change the colors and tried installing it again from this thread. Is there another file I must deleted before reinstalling it, like a reference file?

              Thanks

              Comment


                #8
                Hello Trading 618,

                The supported way of deleting indicators is through:

                Tools > Edit NinjaScript > Indicator > Highlight an indicator and click Delete.

                Deleting files manually will work, but you must also compile after manually deleting any files.
                Ryan M.NinjaTrader Customer Service

                Comment


                  #9
                  Thanks for the quick response Ryan. I do not have the options under tools to edit a ninja script. I trade with the liver version but not paid. How do I compile after I delete the file manually?

                  Comment


                    #10
                    You need the free simulated version or a live license to work with NinjaScript.


                    Please register at the below link to use the free simulated version:
                    Ryan M.NinjaTrader Customer Service

                    Comment


                      #11
                      Thanks Ryan, I got it to work after editing the new file with the color changes, but the indicator I downloaded from this thread only had a provision to edit 1 color vs up and down volume.
                      Anyhow, good enough for me!

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by DJ888, 04-16-2024, 06:09 PM
                      6 responses
                      18 views
                      0 likes
                      Last Post DJ888
                      by DJ888
                       
                      Started by Jon17, Today, 04:33 PM
                      0 responses
                      1 view
                      0 likes
                      Last Post Jon17
                      by Jon17
                       
                      Started by Javierw.ok, Today, 04:12 PM
                      0 responses
                      6 views
                      0 likes
                      Last Post Javierw.ok  
                      Started by timmbbo, Today, 08:59 AM
                      2 responses
                      10 views
                      0 likes
                      Last Post bltdavid  
                      Started by alifarahani, Today, 09:40 AM
                      6 responses
                      41 views
                      0 likes
                      Last Post alifarahani  
                      Working...
                      X