Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Developing an indicator that displays only text in Panel 2 thru N

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

    Developing an indicator that displays only text in Panel 2 thru N

    I am working on an indicator that will only display text in Chart Panel 2 thru N. Attach are examples of indicator output to clarify my questions. The Panel 2.bmp indicator was created as a New NinjaScript Indicator and the generated code was updated to:

    a) Draw text in the four corners of the chart with DrawTextFixed().

    b) Remove Indicator's label and parms from top of chart by overriding ToString().

    Referring to the attached Panel 2.bmp:

    1) When the chart has no Indicator labels and parms, is there a way to expand the chart are to fill the blank two lines at the top of the chart?

    2) The text that is drawn TopLeft and BottomLeft are not close to the chart's edge as the TopRight and BottomRight are. Is there a way to remove the left gap?

    3) Since there is no price information on the chart, is there a way to remove the y-axis text?

    Referring to the attached Panel 3.bmp:

    4) Color adds so much to displayed information. I have been able to colorize the indicator DrawTextFixed() text using existing NinjaScript capabilities but it is not done efficiently. Has there been any thought given to adding a subset of HTML like tags to selectively color the text drawn with DrawTextFixed()?

    Sorry about the heavly cropped bmps, but I had to stay within attachment limits.
    Attached Files
    Last edited by Jim W.; 02-07-2009, 09:51 PM.

    #2
    Hello,

    1) When the chart has no Indicator labels and parms, is there a way to expand the chart are to fill the blank two lines at the top of the chart?
    >>Someone will need to get back to you on this question on Monday. Thank you for your patience.

    2) The text that is drawn TopLeft and BottomLeft are not close to the chart's edge as the TopRight and BottomRight are. Is there a way to remove the left gap?
    >>Sorry same as above.

    3) Since there is no price information on the chart, is there a way to remove the y-axis text?
    >>You can set the axis color to transparent by double clicking the chart>color of axis, set it to Transparent.

    Referring to the attached Panel 3.bmp:

    4) Color adds so much to displayed information. I have been able to colorize the indicator DrawTextFixed() text using existing NinjaScript capabilities but it is not done efficiently. Has there been any thought given to adding a subset of HTML like tags to selectively color the text drawn with DrawTextFixed()?
    >>Someone will assist you with this question on Monday as well.

    Thank you for your patience.
    DenNinjaTrader Customer Service

    Comment


      #3
      Ben,

      Monday will be fine. Thanks for the very prompt reply.

      Your suggestion to set the color of the axis to Transparent produces a very interesting looking chart. The axis color is used for the box drawn around each panel and both the x and y axis. I may have a use for this someday, but right now Panel 1 contains a chart that requires both axis.

      In a Panel without charted data the y axis appears to show the % height of the panel, including the Indicator label and parameter line. This is the only text that i want to hide.

      Below is the updated source for the indicator that produced Panel 2.bmp:

      protected override void Initialize()
      {
      DrawOnPricePanel = false; // Want to draw in panel other than 1

      CalculateOnBarClose = true;
      Overlay = false;
      PriceTypeSupported = false;
      }
      protected override void OnBarUpdate()
      {
      DrawTextFixed("tag1", "TL", TextPosition.TopLeft);
      DrawTextFixed("tag2", "TR", TextPosition.TopRight);
      DrawTextFixed("tag3", "BL", TextPosition.BottomLeft);
      DrawTextFixed("tag4", "BR", TextPosition.BottomRight);
      }

      // Override below removes Indicator's label and parms from top of chart
      public override string ToString()
      {
      return "";
      }
      Last edited by Jim W.; 02-08-2009, 09:40 AM.

      Comment


        #4
        Jim,

        There is no way to use the space reserved for labeling unless you override the Plot() method for drawing in your indicator.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Thanks Josh,

          I have overridden Plot() in some of my other Indicators, so I know what to do.

          Any thoughts on my other three questions?
          Last edited by Jim W.; 02-09-2009, 11:03 AM.

          Comment


            #6
            2) The text that is drawn TopLeft and BottomLeft are not close to the chart's edge as the TopRight and BottomRight are. Is there a way to remove the left gap?

            Unfortunately not.

            3) Since there is no price information on the chart, is there a way to remove the y-axis text?

            Unfortunately not.

            4) Color adds so much to displayed information. I have been able to colorize the indicator DrawTextFixed() text using existing NinjaScript capabilities but it is not done efficiently. Has there been any thought given to adding a subset of HTML like tags to selectively color the text drawn with DrawTextFixed()?

            Thanks for the suggestion. I will forward it to development.
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              Thanks Josh,

              I have posted to Suggestions all of the items at http://www.ninjatrader-support2.com/...ad.php?t=14072 .

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Franck Z, Today, 09:49 AM
              0 responses
              5 views
              0 likes
              Last Post Franck Z  
              Started by pvtrader, Today, 08:02 AM
              2 responses
              7 views
              0 likes
              Last Post pvtrader  
              Started by Natoc, Today, 03:04 AM
              1 response
              17 views
              0 likes
              Last Post NinjaTrader_Jason  
              Started by Rudy2323, Today, 02:56 AM
              2 responses
              28 views
              0 likes
              Last Post Rudy2323  
              Started by tonynt, Yesterday, 02:07 PM
              1 response
              38 views
              0 likes
              Last Post NinjaTrader_Jason  
              Working...
              X