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

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 cre8able, Today, 01:16 PM
                2 responses
                9 views
                0 likes
                Last Post cre8able  
                Started by chbruno, 04-24-2024, 04:10 PM
                3 responses
                48 views
                0 likes
                Last Post NinjaTrader_Gaby  
                Started by samish18, Today, 01:01 PM
                1 response
                7 views
                0 likes
                Last Post NinjaTrader_LuisH  
                Started by WHICKED, Today, 12:56 PM
                1 response
                9 views
                0 likes
                Last Post NinjaTrader_Gaby  
                Started by WHICKED, Today, 12:45 PM
                1 response
                11 views
                0 likes
                Last Post NinjaTrader_Gaby  
                Working...
                X