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

Price oscillator coloring

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

    Price oscillator coloring

    Good morning,

    I am looking for a way of displaying a price oscillator in the following manner as shown in the picture below. I understand you have something like this with the Bill Williams Awesome oscillator but that doesn't give you the ability to change the parameters of the two moving averages which is what I am looking for. I need the oscillator to have the ability to change color and also change the length of the moving averages and the smoothing settings. I have managed to create a price oscillator with my parameters as per the default settings on the ninja platform but it doesn't change color can anyone help in this regard, please??

    Many thanks
    Attached Files

    #2
    Hello qsilver,

    The PlotBrushes are where the colors for each bar for a plot can be set.

    Below is a link to the help guide.
    https://ninjatrader.com/support/help...lotbrushes.htm
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Not exactly sure how that would work ... I have many other indicators on my chart in addition to this one and my coding skills are close to 0 :-(

      Comment


        #4
        Hello qsilver,

        Below is a link to a forum post with helpful information about getting started with C# and NinjaScript.
        https://ninjatrader.com/support/foru...040#post786040

        Note that understanding C# is prerequisite to coding NinjaScript.

        As an example:

        if (/* my condition to paint bar here */)
        {
        PlotBrushes[0][0] = Brushes.Black;
        }

        You can also contact a professional NinjaScript Consultant who would be eager to create or modify this script at your request or assist you with your script. The NinjaTrader Ecosystem has affiliate contacts who provide educational as well as consulting services. Please let me know if you would like our NinjaTrader Ecosystem team follow up with you with a list of affiliate consultants who would be happy to create this script or any others at your request or provide one on one educational services.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          so can you give me an example of how I would go about programming this just to help me getting started ty so much

          Comment


            #6
            Hello qsilver,

            Try adding the code example from the help guide to the OnBarUpdate of a new script.

            This is working sample code and will change a plot brush based on if the plot is rising or falling.
            Chelsea B.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by marishany, Today, 06:04 AM
            0 responses
            1 view
            0 likes
            Last Post marishany  
            Started by kaywai, Today, 05:22 AM
            0 responses
            1 view
            0 likes
            Last Post kaywai
            by kaywai
             
            Started by c_schmitti, Today, 05:20 AM
            0 responses
            4 views
            0 likes
            Last Post c_schmitti  
            Started by RookieTrader, Today, 04:42 AM
            0 responses
            5 views
            0 likes
            Last Post RookieTrader  
            Started by kaywai, Today, 04:34 AM
            1 response
            2 views
            0 likes
            Last Post kaywai
            by kaywai
             
            Working...
            X