Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Scaling charts: indicators

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

    Scaling charts: indicators

    Hi NT,

    I built a custom indicator, that outpluts 2 lines:
    - the 16 period SMA of the diffference between the 3 and 10 SMA
    - the 2 period ROC

    But then I plot them, the 2 period ROC, looks pretty flat, obviosly becayse they are sharing the scale. I want both lines on the same pane.
    How do I remedy this please ?

    Thanks
    AK

    #2
    Hello akvevo,

    Thank you for the post.

    You will need to either scale the small values up or scale the large values down manually.

    You could use a multiplier that will scale the plots to make them have the same range as the other indicator.

    For example, if you wanted to scale the smaller values to the larger ones, find the maximum value of the larger plot, then get this ratio:

    Code:
    ratio = 100/max_val_of_large_plot
    Then multiply all values of the small plot by this ratio. If it is not enough, increase the numerator.

    Please let me know if I may be of any further assistance.

    Comment


      #3
      Thanks Chris for the valid suggestion, although it doesnt work in practice, becuase it slightly alters the scale of the large values.

      Is it possible to plot both series on the same panel with indepent scales?

      Comment


        #4
        Hello akvevo,

        Thank you for the reply.

        Due to the scaling, it is not possible to display these two plots without the smaller one being dwarfed by the larger plot.

        You can override the OnCalculateMinMax() function to set the scaling relative to the output of the two plots.

        More info on OnCalculateMinMax() here:


        As long as your two values are close to each other, the scaling should work out since there will not be as much of a spread after you scale up the small plot.

        If you do need to plot these without scaling, please consider separating these into two different indicators so they can exist in their own plot.

        Please let us know if we may be of any further assistance.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        574 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        332 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        101 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        553 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        551 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X