Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

AddChartIndicator but in separate panel for strategy

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

    AddChartIndicator but in separate panel for strategy

    AddChartIndicator for example SMA for an indicator that uses its own panel - shows up in the main panel and so must be manually moved to a new panel OR to that indicators panel.

    Adding SMA for Volume will calculate the volume indicator's SMA. But it puts the line in the main panel. This of course distorts the main panel and requires the trader to move the SMA to a different panel.

    Hopefully, not having to copy and create a new SMA that is in new panel, is there a method to instruct the indicator to not be in the main panel?

    #2
    Hello JMont1,

    Thank you for your post.

    You can specify what panel you want the added indicator to plot on by using .Panel.

    For example,
    Code:
    //specify indicator should plot on panel 2 or replace with desired panel number
    AddChartIndicator(myIndicator);
    myIndicator.Panel = 2;

    Comment


      #3
      Is there a way to name the indicator panel you want an indicator like moving average of that indicator to use?
      For instance, if I were to use that on an SMA for VOL, could I use: myIndicator.Panel = Vol ?

      Also, myIndicator.Panel would work for a strategy, but anyway I can do the same panel selection for an indicator?

      Strategy Builder would not allow for just adding in this code without cracking the SB. So, it would be good if I could add this designation in an indicator knowing I was going to use it in Strategy Builder and which panel I want the moving average to go in. So if I know the VOL indicator will be the third panel, I could modify an MA to position it in the third panel with its data originator.

      I foolishly tried using the code above, but of course the indicator does not have myIndicator code.

      Thank you.
      Last edited by JMont1; 01-25-2025, 08:19 PM.

      Comment


        #4
        Hello,

        There is no way to name an indicator panel.

        Indicator code will only allow you to specify whether the indicator is going to plot on the price panel or its own panel using IsOverlay.

        If you want two indicators on the same panel in your strategy, this would require unlocked the code. IsOverlay must be set to false in the indicator, and then you can change the panel it is going to plot on in the strategy's code.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CaptainJack, 05-29-2026, 05:09 AM
        0 responses
        160 views
        0 likes
        Last Post CaptainJack  
        Started by CaptainJack, 05-29-2026, 12:02 AM
        0 responses
        81 views
        0 likes
        Last Post CaptainJack  
        Started by charlesugo_1, 05-26-2026, 05:03 PM
        0 responses
        125 views
        0 likes
        Last Post charlesugo_1  
        Started by DannyP96, 05-18-2026, 02:38 PM
        1 response
        206 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 05-11-2026, 05:56 AM
        0 responses
        184 views
        0 likes
        Last Post CarlTrading  
        Working...
        X