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

Programatically create and control charts in NinjaScript

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

    Programatically create and control charts in NinjaScript

    Is it possible to programatically create and control charts in NinjaScript? I know this will almost certainly be unsupported, but unsupported is better than not possible.

    Hopefully, in NT8, this will be supported. Meanwhile, an unsupported method in NT7 would be much appreciated, all caveats being well understood.

    Thanks.
    Multi-Dimensional Managed Trading
    jeronymite
    NinjaTrader Ecosystem Vendor - Mizpah Software

    #2
    Hello jeronymite,

    You would not be able to create a chart using NinjaScript, but you can control a chart using NinjaScript to a certain degree.

    You may change the background, Candleoutline, BarColor, etc... using NInjaScript that is supported. Here is a link to our Help Guide that goes over some of the Drawing methods that you can use to control a chart.


    There are more ways you may control a chart by overriding the plot method but this would be unsupported. Here is a good link to a thread that goes over some ways you can also control a chart.
    JCNinjaTrader Customer Service

    Comment


      #3
      Thanks.

      I am creating a front-end trading application for a specific financial environment. What I really need is the ability to:
      • Create a chart with specific properties (as per the Properties Grid when creating a chart manually)
      • Control the chart:
        • Change the properties of the chart, as per the toolstrip of the chart; e.g. timeframe, adding/removing indicators, etc
        • Re-scale the axes
        • Etc (basically anything one can do manually, I want to be able to do programmatically)

      • Delete the chart

      Any unsupported methods in NT7 to do these things would be greatly appreciated!

      Making it possible to do these things in a supported manner in NT8 would be extremely desirable!

      Thanks for any further assistance.
      Multi-Dimensional Managed Trading
      jeronymite
      NinjaTrader Ecosystem Vendor - Mizpah Software

      Comment


        #4
        Update?

        It's nearly 1.5 years since I posted this enquiry. (How time flies when you're having fun!)

        Just wondering if anyone has discovered any (very unsupported, no doubt) magic in the meantime to do any or all of this? Primarily the ability to create a chart with a given instrument and time-frame is required, but the other actions are highly desirable.

        Also, here's hoping it will all be possible and supported in NT8.

        Thanks!
        Multi-Dimensional Managed Trading
        jeronymite
        NinjaTrader Ecosystem Vendor - Mizpah Software

        Comment


          #5
          Originally posted by jeronymite View Post
          It's nearly 1.5 years since I posted this enquiry. (How time flies when you're having fun!)

          Just wondering if anyone has discovered any (very unsupported, no doubt) magic in the meantime to do any or all of this? Primarily the ability to create a chart with a given instrument and time-frame is required, but the other actions are highly desirable.

          Also, here's hoping it will all be possible and supported in NT8.

          Thanks!
          Whereas you cannot really do that easily through NinjaScript, have you considered that while you wait, you could do it by scripting from Windows itself?

          AutoIt is a freeware BASIC-like scripting language designed for automating the Windows GUI and general purpose scripting.


          Not very neat, I know, but it does work.

          Comment


            #6
            Thanks!

            Many thanks, koganam! Very useful indeed.
            Multi-Dimensional Managed Trading
            jeronymite
            NinjaTrader Ecosystem Vendor - Mizpah Software

            Comment


              #7
              On a similar note is it possible to programmatically switch the focus to a another open chart and perhaps enable a strategy?

              Thanks in advance.

              Comment


                #8
                Originally posted by Hank_R View Post
                On a similar note is it possible to programmatically switch the focus to a another open chart and perhaps enable a strategy?

                Thanks in advance.
                AutoIT should be able to do that, yes.

                Comment


                  #9
                  Originally posted by jeronymite View Post
                  It's nearly 1.5 years since I posted this enquiry. (How time flies when you're having fun!)

                  Just wondering if anyone has discovered any (very unsupported, no doubt) magic in the meantime to do any or all of this? Primarily the ability to create a chart with a given instrument and time-frame is required, but the other actions are highly desirable.

                  Also, here's hoping it will all be possible and supported in NT8.

                  Thanks!
                  There are plenty of custom price ladders and stuff out there, so you should be able to use your own charting package. At that point you just might as well develop your own software? Why get stuck with an albatross over your head. NT upgrades would break all the custom code.

                  Comment


                    #10
                    Originally posted by koganam View Post
                    AutoIT should be able to do that, yes.
                    As well as AutoHotkey, see http://ahkscript.org.

                    I think AutoHotkey and AutoIt share a common lineage ...

                    Search for AutoHotkey on Big Mike's for some interesting ideas.

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by sidlercom80, 10-28-2023, 08:49 AM
                    168 responses
                    2,262 views
                    0 likes
                    Last Post sidlercom80  
                    Started by Barry Milan, Yesterday, 10:35 PM
                    3 responses
                    10 views
                    0 likes
                    Last Post NinjaTrader_Manfred  
                    Started by WeyldFalcon, 12-10-2020, 06:48 PM
                    14 responses
                    1,429 views
                    0 likes
                    Last Post Handclap0241  
                    Started by DJ888, 04-16-2024, 06:09 PM
                    2 responses
                    9 views
                    0 likes
                    Last Post DJ888
                    by DJ888
                     
                    Started by jeronymite, 04-12-2024, 04:26 PM
                    3 responses
                    41 views
                    0 likes
                    Last Post jeronymite  
                    Working...
                    X