Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

DrawRegressionChannel on Indicator?

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

    DrawRegressionChannel on Indicator?

    Is it possible to use DrawRegressionChannel() on an indicator?

    I can get one of the lines to draw on the indicator, but it seems that the other 2 lines aren't plotting

    When I double click on the line and look at the properties, there is a drop down for price type, and indicator isn't listed... would this setting prevent drawRegressionChannel from drawing all the lines?


    Also, there isn't a width setting in the parameters, only a way to change it via the properties. (for the number of std deviations) this should be added as an enhancement.

    Thanks

    Matt

    #2
    Hi tazatek,

    Thank you for your post.

    So that I can test this on my end, can you please the DrawRegressionChannel() code snippet.

    Also, thank you for the suggestion!
    TimNinjaTrader Customer Service

    Comment


      #3
      Here's a brief snippet of what I'm doing... sorry I don't have more....


      I've since decided that this won't work (unless you tell me otherwise), so I'm drawing the Upper and Lower lines manually in my indicators for now....

      Code:
      // this would be in onbarupdate()...
      
      DrawOnPricePanel=false;
      					DrawRegressionChannel("regChanind"+CurrentBar,true,10,0,Color.Red,DashStyle.Solid,1,Color.Yellow,DashStyle.Solid,1,Color.Red,DashStyle.Solid,1);		
      
      DrawOnPricePanel=true;
      Thanks

      Matt

      Comment


        #4
        tazatek,

        First, with...

        DrawOnPricePanel=false;

        will draw this on a different panel, is that what you are trying to do?

        Also with "regChanind"+CurrentBar, will draw a regression for every bar, overlapping them continuously, it that what you want?

        What exactly are you looking to accomplish, do you want everything on the price panel? Do you want the drawing to be repeated?
        TimNinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_Tim View Post
          tazatek,

          First, with...

          DrawOnPricePanel=false;

          will draw this on a different panel, is that what you are trying to do?

          Also with "regChanind"+CurrentBar, will draw a regression for every bar, overlapping them continuously, it that what you want?

          What exactly are you looking to accomplish, do you want everything on the price panel? Do you want the drawing to be repeated?
          As per my original question, I'm trying to use the NT method DrawRegressionChannel() on an indicator.

          The label of regChanind+CurrentBar was in a loop that would only spark occasionlly. if left as is, would run continously, and not what I would want, nor the heart of the matter.

          The question still remains.... can DrawRegressionChannel() be used in an indicator?

          Comment


            #6
            Hi tazatek,

            My apologies for the confusion, I now understand you want to draw it in an indicator panel.

            First, it is recommended that you use DrawOnPricePanel=false; in initialize.

            Are you seeing any errors in the log tab of the Control Center?
            TimNinjaTrader Customer Service

            Comment


              #7
              No errors in logs.

              Is it supposed to be plotting in the indicator? (I'm currently in NT Beta 13, if that matters...)

              Matt

              Comment


                #8
                Hi tazatek,

                Yes, I have tried this on my end with

                DrawOnPricePanel=false; in initialize.

                Check to make sure the two "missing" lines are not out of the bounds of the indicator panel Y-axis.
                TimNinjaTrader Customer Service

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