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

ChartControl unsupported?

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

    ChartControl unsupported?

    Actually, I thought that you have been quite clear that use of ChartControl is unsupported. Then I looked at the HeikenAshi code, and what do I find but the following:

    Code:
    int x = ChartControl.GetXByBarIdx(BarsArray[0], idx);
    int y1 = ChartControl.GetYByValue(this, valO);
    int y2 = ChartControl.GetYByValue(this, valH);
    int y3 = ChartControl.GetYByValue(this, valL);
    int y4 = ChartControl.GetYByValue(this, valC);
    What is the supported way to do the equivalent -- get the coordinates needed for plotting?

    Thanks,
    EV

    #2
    Correct EV, the use of the ChartControls is not documented / not supported - you can play around with it though and see if it works for you.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      I understand that people can, and do, play around with ChartControl. Such code can also break from release to release.

      My question was whether there is a supported way to do what that code does -- to find where to plot a point without using ChartControl?

      --EV

      Comment


        #4
        Unfortunately there's no supported method for this task, otherwise it would've been used in the indicator.
        BertrandNinjaTrader Customer Service

        Comment


          #5
          NT provides the source for each of its indicators. That is great, and please continue to do so. It is very helpful, and very much appreciated. They are a great learning tool, and a fine base for starting custom work.

          It seems to me that one of the roles of that source of the roles for that source should be to provide users with good code examples, using supported techniques. In that vein, let me propose that NT verify that all of its indicators are implemented using supported methods. For those that cannot be, add a supported way to do the task and have the indicator use that way.

          If an indicator needs a particular capability, that is good evidence that custom indicators may also need that capability. It would therefore make good sense for NT to provide a supported way of doing that task. A couple of examples come immediately to mind:
          • The one we are talking about in this thread -- the ability to get absolute coordinates for a date and a price, so that one knows what to pass the Draw routines.

          • Any available user information, such as preferred colors, should be available at Initialize() time. The reason that the user information is needed so early is so that it can be used to help set default configuration values for an indicator.
          (Right now, I do not think there is any way to do that, supported or unsupported. The only way I know how to do that is through the ChartControl object, and that is not available at Initialize() time.)
          I'm sure there are many others, but those example are a start.

          --EV
          Last edited by ETFVoyageur; 01-11-2011, 07:25 AM.

          Comment


            #6
            Thank you for your suggestion and feedback - I'll forward it for consideration - the main objective of the indicators is to supply the users with a certain functionality, on top of that of course offering a starting point for custom coding...
            BertrandNinjaTrader Customer Service

            Comment


              #7
              I do understand what you are saying.

              Thanks for forwarding the suggestion that they also be considered an educational resource, and a base for doing supported custom coding.

              Besides, anything that the NT indicators need is probably also needed by some customer indicators. It would be good if such needs could be met in a supported manner.

              --EV

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by algospoke, Yesterday, 06:40 PM
              2 responses
              23 views
              0 likes
              Last Post algospoke  
              Started by ghoul, Today, 06:02 PM
              3 responses
              14 views
              0 likes
              Last Post NinjaTrader_Manfred  
              Started by jeronymite, 04-12-2024, 04:26 PM
              3 responses
              45 views
              0 likes
              Last Post jeronymite  
              Started by Barry Milan, Yesterday, 10:35 PM
              7 responses
              21 views
              0 likes
              Last Post NinjaTrader_Manfred  
              Started by AttiM, 02-14-2024, 05:20 PM
              10 responses
              181 views
              0 likes
              Last Post jeronymite  
              Working...
              X