• 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

Drawing in time axis

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

    Drawing in time axis

    Hi all, I have a special problem now. I need to draw onto time axis to print my own tick labels. How is it possible? (And I know it has to be possible, because some indicators use it ) I tried to get Graphics of ChartPanel and draw into axis area. That worked but just till the moment the time axis is redrawn.

    My next problem is how to change a string which is shown in list of indicators and also in a Label parameter. I like to use spaces and some special chars in this string and I couln't find out how to do that. Overriding of ToString() method just changes a string shown in a left top corner of the chart.

    Thank you for your help.

    #2
    Hello ku8az,

    There are unfortunately no supported techniques for drawing on the axis. You can explore intellisense to see the ChartControl options available, or receive input from other community members in this area.

    change a string which is shown in list of indicators
    Is this is the name of the indicator in the list you want to change? If you want to change this, Right Click in NS editor > Save As and Provide a new name.

    also in a Label parameter.
    The label can be changed by Overriding the string method. The technique is shown in this post:
    http://www.ninjatrader.com/support/f...ead.php?t=4749
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Hi Ryan, thanks for your quick reply but it didn't help at all.

      Originally posted by NinjaTrader_RyanM View Post
      Is this is the name of the indicator in the list you want to change? If you want to change this, Right Click in NS editor > Save As and Provide a new name.
      If I select Save As, it doesn't allow me to use space or any special chars. And when I rename indicator file in file manager and compile, it still uses indicator class name in available Indicators list. I just need some technique how to replace this string with something else.

      Originally posted by NinjaTrader_RyanM View Post
      The label can be changed by Overriding the string method. The technique is shown in this post:
      http://www.ninjatrader.com/support/f...ead.php?t=4749
      You are right, but it is just only a label which is shown in the chart. I want to change a Label property in a Visual group of properties.

      Comment


        #4
        Thank you for your feedback. There is no other supported technique to renaming your indicator beyond Right Click > Save As in the NS editor.
        Ryan M.NinjaTrader Customer Service

        Comment


          #5
          Code:
          this.Name = "String to Show";
          in the Initialize() method.

          Comment


            #6
            AMAZING! I could swear to God I tried it before and it didn't work. Now it is ok. Thank you. Now it remains to solve the painting problem to time axis. I realized, that in the indicator I use as reference it is done (probably) with redraw (or replace with some panel) this axis and then draw strings onto it but still couldn't realize how to do that permanenty.

            Comment


              #7
              Originally posted by ku8az View Post
              AMAZING! ... Now it remains to solve the painting problem to time axis. I realized, that in the indicator I use as reference it is done (probably) with redraw (or replace with some panel) this axis and then draw strings onto it but still couldn't realize how to do that permanenty.
              That is probably being done with a custom Plot() override drawing at Bounds.Y or Bounds.Bottom.

              Come to think of it, you might not even need a custom plot, and can just place the drawing there as the y-parameter, but I have never tried.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by chrismcdermut, Yesterday, 01:46 PM
              3 responses
              17 views
              0 likes
              Last Post MojoJojo  
              Started by Bricolico, Yesterday, 09:28 PM
              0 responses
              5 views
              0 likes
              Last Post Bricolico  
              Started by Tradwell385, Yesterday, 08:51 PM
              0 responses
              7 views
              0 likes
              Last Post Tradwell385  
              Started by dvcpro4, Yesterday, 07:08 PM
              0 responses
              19 views
              0 likes
              Last Post dvcpro4
              by dvcpro4
               
              Started by pennywise, Yesterday, 06:40 PM
              0 responses
              8 views
              0 likes
              Last Post pennywise  
              Working...
              X