• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

lines not showing in indicator NT7 panel indicator

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

    lines not showing in indicator NT7 panel indicator

    I was wondering if there is a difference in drawing lines on an indicator on a panel VS a chart

    this is what I have. (I am testing my lines but nothing is being shown on the panel

    DrawLine("Buy",true,Time[5],0,Time[20],1000,Color.Green,DashStyle.Solid,3);
    DrawLine("Sell",true,Time[10],0,Time[30],-1000,Color.Red,DashStyle.Solid,3);

    DrawHorizontalLine("horizontal",0.0,Color.Black);

    what am I doing wrong that it will not show?

    #2
    Hello,

    If the indicator is applied to a secondary panel, by default the drawing objects will still be sent to the chart panel. You would need to remove the indicator from the chart and then reapply it after setting DrawOnPricePanel = false.

    http://ninjatrader.com/support/helpG...ightsub=drawon

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      my logic

      there is nothiung to my logic right now I just want to make sure I can draw.

      protected override void Initialize()
      {
      Overlay = false;
      DrawOnPricePanel = false;
      }

      /// <summary>
      /// Called on each bar update event (incoming tick)
      /// </summary>
      protected override void OnBarUpdate()
      {
      // Use this method for calculating your indicator values. Assign a value to each
      // plot below by replacing 'Close[0]' with your own formula.
      DrawVerticalLine("my", Time[9],Color.Black,DashStyle.Solid,5);

      DrawLine("Buy",true,Time[5],0,Time[20],1000,Color.Green,DashStyle.Solid,3);
      DrawLine("Sell",true,Time[10],0,Time[30],-1000,Color.Red,DashStyle.Solid,3);

      DrawHorizontalLine("horizontal",0.0,Color.Black);
      }

      Comment


        #4
        figured it out it was an array issue

        Comment


          #5
          now I have the lines to show how do I get my zero line to be in the middle of the indicator it wants to be

          this is all I have

          if(CurrentBar > 12)
          {

          DrawLine("Buy",false,Time[5],0,Time[5],10,Color.Green,DashStyle.Solid,3);
          DrawLine("Sell",false,Time[10],-10,Time[10],-0,Color.Red,DashStyle.Solid,3);

          DrawHorizontalLine("horizontal",0,Color.Black);
          }
          Attached Files

          Comment


            #6
            Hello,

            Thank you for confirming the other item was resolved.

            Are you asking how to scale the line to the center of the panel? If so, please first ensure the panel is already scaled and there is no F in the upper right corner, if there is click the F and ensure the scale is not centered still.

            Placing a line at the max value and min value you want to be scaled, and setting them to autoscale true should allow the indicator to rescale to that range. You are currently using false for both lines.

            Alternatively, You can specify the scale the panel should have by using the following override:

            Code:
            public override void GetMinMaxValues(ChartControl chartControl, ref double min, ref double max)
            {   }
            This is not documented, so you would need to review the ZigZag indicator or the HeikenAshi to see a working example of its use.

            I look forward to being of further assistance.
            JesseNinjaTrader Customer Service

            Comment


              #7
              Thankyou Also where can I get an understanding on autoscale I dont see differences on charts etc or how to use autoscale accordingly

              Comment


                #8
                Hello,

                Autoscale is simply the true or false value you provide to let the chart know if the scale should be adjusted to account for the item in question which could be an indicator, drawing object or price on the chart.

                I believe the only documented description of this property is at the following link: http://ninjatrader.com/support/helpG...tsub=autoscale

                Autoscale is the charts logic that determines what prices to display as the min and max of the chart scale. This is delegated by drawing objects and prices on the chart along with the settings used in the charts scale properties. So long as the chart scale properties are set to Automatic(the default) it will account for drawing objects if they are set to Autoscale = true.

                An example would be if you have drawing object at a price of 0 on the ES chart where the price is around 2500, the autoscale will start by scaling in the ES prices according to the chart settings which does not include a price of 0. If the drawing object is set to AutoScale == true, a scale of 0 ~ 2500 would be used. If set to false, the scale of the chart would remain unchanged.


                I look forward to being of further assistance.
                JesseNinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Irukandji, Today, 06:09 AM
                0 responses
                2 views
                0 likes
                Last Post Irukandji  
                Started by Irukandji, Today, 06:00 AM
                0 responses
                3 views
                0 likes
                Last Post Irukandji  
                Started by saumil, Today, 05:47 AM
                0 responses
                2 views
                0 likes
                Last Post saumil
                by saumil
                 
                Started by yeshujbp, Today, 05:33 AM
                0 responses
                1 view
                0 likes
                Last Post yeshujbp  
                Started by bebbus, Today, 04:50 AM
                0 responses
                2 views
                0 likes
                Last Post bebbus
                by bebbus
                 
                Working...
                X