Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Mountain Plot Style For Indicators

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

    Mountain Plot Style For Indicators

    Dear Support,

    Looking for sample code to plot indicators, i.e. a SMA using a Mountain style similar to ChartStyleType.Mountain. I understad this style is not availe for indicator plots. However, as an alternative, wondering if using Draw.Region() can produce similar results. What would the Syntax code for Draw.Region() to define the lower ;ine as the chart boundary with the upper boundary as the SMA value?

    Many thanks.
    Last edited by aligator; 09-15-2023, 10:14 AM.

    #2
    Hello aligator,

    You could get a similar result using Draw.Region, you would need to draw between 0 and the indicators price. To do that you would need to add a custom series and set 0 as the value for each bar. Then use that series with the Draw.Region tool. You can use the sample from the help guide and just replace the indicators being used with the SMA and your custom series.


    Comment


      #3
      Originally posted by NinjaTrader_Jesse View Post
      Hello aligator,

      You could get a similar result using Draw.Region, you would need to draw between 0 and the indicators price. To do that you would need to add a custom series and set 0 as the value for each bar. Then use that series with the Draw.Region tool. You can use the sample from the help guide and just replace the indicators being used with the SMA and your custom series.

      https://ninjatrader.com/support/help...ightsub=series
      https://ninjatrader.com/support/help...tsub=draw.regi
      Thank you Jesse,

      I tried using a Custom Series, and I could not get it to draw. However, I just added a secondary AddPlot() with a constant value of zero and work fine.

      I might be wrong, but I assume, similar to the Market Analyzer, the Draw.Region needs two plots (lines) perhaps to function. I can be corrected though. Here is what I came up with:

      Thanks again.

      Cheers!
      Attached Files

      Comment


        #4
        Hello aligator,

        You can also use a plot for the same purpose but that will be shown on the chart and listed in the databox, that is the reason I suggested using just a Series<double>. A plot is just a Series<double> that the chat also displays. If what you have works for the purpose you intended you can leave the plot or if you don't want to see the plot you can use a private Series<double>.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        638 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        366 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        107 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        569 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        572 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X