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.
    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.


        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 cls71, Today, 04:45 AM
            0 responses
            1 view
            0 likes
            Last Post cls71
            by cls71
             
            Started by mjairg, 07-20-2023, 11:57 PM
            3 responses
            213 views
            1 like
            Last Post PaulMohn  
            Started by TheWhiteDragon, 01-21-2019, 12:44 PM
            4 responses
            544 views
            0 likes
            Last Post PaulMohn  
            Started by GLFX005, Today, 03:23 AM
            0 responses
            3 views
            0 likes
            Last Post GLFX005
            by GLFX005
             
            Started by XXtrader, Yesterday, 11:30 PM
            2 responses
            12 views
            0 likes
            Last Post XXtrader  
            Working...
            X