Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Help requested on how to code a new feature in NT8

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

    Help requested on how to code a new feature in NT8

    Hi guys,

    I am wanting to achieve something that I don’t think is possible out of the box with NT8, but was hoping with the new functionality of Add-Ons and other possible customisation, that maybe someone could point me in the right direction on how I can create my desired functionality. My current programming skills are probably ‘lower-intermediate’ but if I have a direction to go I can hopefully figure it out from there.

    When I am looking at a trade opportunity, I generally have 5 charts in my workspace. This can vary but is usually 2 higher and 2 lower timeframes, then a ‘mid frame’. I would like to be able to have functionality in place so that if I change the interval of the mid-frame chart, the other 4 charts will automatically change their interval. Currently I get around this by having a different workspace for each timeframe, but if I can achieve the above, I think it would be more efficient.

    I'm not sure how to make the charts interact with each other or be aware of the other charts interval, but the logic is something like this:

    if [midframe chart] interval is 15 min then this chart is 5 min
    else if [midframe chart] interval is 60 min then this chart is 15 min
    else if [midframe chart] interval is 240 min then this chart is 60 min
    … And so on.

    I would then have the appropriate variation of that for each of the 4 other charts.

    Thanks in advance for any help!!
    Cheers,
    Shane

    #2
    Hello,

    Thank you for the question.

    This does seem like it could potentially be possible as an addon, I will review this question and see if I can locate any ways to do this. Once I have looked I will reply back.

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

    Comment


      #3
      Thanks Jesse, much appreciated!

      Comment


        #4
        Hello,

        I wanted to follow up on this question.

        It appears currently there are no exposed ways to set another charts interval, so unfortunately the root of this question is not currently possible. I will submit a feature request for more interval options in NinjaScript.

        I did however put together a sample of the test I was conducting so feel free to explore using the script.

        This sample basically loops through the window collection and finds charts. There is a mainChart variable and an otherChart variable in the loop in which you can reference the chart the indicator is on as the main and all other charts are the otherChart.

        I set up a couple of conditions for the barsPeriod so you could delegate logic based on what the periods are set to etc.

        To test this, open two charts, one on 15 minute and the other on any time frame. Apply the indicator to the 15 minute chart and view the output window, you should see a print: Other Chart is: ES 12-15 Second.

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

        Comment


          #5
          Help requested on how to code a new feature in NT8

          While it will be good to enhance this specific capability in NinjaScript (to be able to manipulate chart time periods directly), the issue raises a long-standing requirement for greater chart control capabilities in NinjaScript that I have articulated on many occasions. I would like to understand what is and is not possible now and to have the "not possible" made possible in NinjaScript.

          Various previous posts for detail:



          To restate the requirement, I really need 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, instrument, 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

          Please provide an update on which, if any, of these things is possible now, and please submit feature requests for any that are not.

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

          Comment


            #6
            Hello,

            For the items posted, Creating and Deleting would not currently be available, one has been sent in as a feature request, I will supply the other.

            For ChartControl, you can view the : ChartControl.Properties to control quite a few of the properties on the chart, using the intelleprompt or if you use Visual Studio the Intellesense, these will assist in finding new properties or methods you can use.

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

            Comment


              #7
              Help requested on how to code a new feature in NT8

              Thanks, Jesse.

              ChartControl.Properties is certainly useful for controlling aspects of the look, feel and behaviour of the chart, but it is also essential to be able to control the content: instrument(s), chart type, period, indicators (add/remove), bar style, price marker(s), etc.

              It would be very helpful if you could point to where any of these are already documented, and request new features for any that are not currently available.

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

              Comment


                #8
                Hello,

                Chart control is documented already along with ChartPanel, ChartBars and ChartScale, to locate it you would just need to search the help guide for ChartControl.

                This is the most relevant link for Charts in general as it lists ChartControl, Scale, Panel and Bars: http://ninjatrader.com/support/helpG...n-us/chart.htm

                Regarding the items to be submitted, as stated in the last reply I have submitted the feature requests for you.

                Please let me know if I may be of further assistance.
                JesseNinjaTrader Customer Service

                Comment


                  #9
                  I too am having trouble using ChartControl and ChartPanel(s).
                  It appears the appropriate ChartControl object does not exist when the State.Configure event occurs: "Error on Calling OnStateChange method: Object reference not set to an instance of..."
                  I would like to add a new Panel at this point, so that an Indicator will go on a new Panel without the user having to remember to set that option.
                  Alternatively, at least expose the appropriate property so that the default can be set when the State.SetDefaults event occurs. The default for DrawOnPricePanel can be set programmatically, but there appears to be no option to handle the case when DrawOnPricePanel is set to false (in the GUI the Panel property appears to always default to Same as Input Series, so it is not clear what effect setting DrawOnPricePanel to false has).
                  Thanks.

                  Comment


                    #10
                    Originally posted by TurtleBeach View Post
                    I too am having trouble using ChartControl and ChartPanel(s).
                    It appears the appropriate ChartControl object does not exist when the State.Configure event occurs: "Error on Calling OnStateChange method: Object reference not set to an instance of..."
                    I would like to add a new Panel at this point, so that an Indicator will go on a new Panel without the user having to remember to set that option.
                    Alternatively, at least expose the appropriate property so that the default can be set when the State.SetDefaults event occurs. The default for DrawOnPricePanel can be set programmatically, but there appears to be no option to handle the case when DrawOnPricePanel is set to false (in the GUI the Panel property appears to always default to Same as Input Series, so it is not clear what effect setting DrawOnPricePanel to false has).
                    Thanks.
                    It seems that you are complicating the issue where none is needed. If you want the indicator to go into a new panel. you use the IsOverlay property. If DrawOnPricePanel is false, drawings will show on the indicator panel instead of on the price panel. What is unclear about that?

                    Comment


                      #11
                      Thanks. Have you considered moonlighting with NT to work on documentation. It was not at all clear to me the interaction between IsOverlay and DrawOnPricePanel and "THE indicator panel". If it is the, why is there a more generic NEW PANEL in the GUI.
                      Sigh.
                      Merry Christmas.

                      Comment


                        #12
                        Originally posted by TurtleBeach View Post
                        Thanks. Have you considered moonlighting with NT to work on documentation. It was not at all clear to me the interaction between IsOverlay and DrawOnPricePanel and "THE indicator panel". If it is the, why is there a more generic NEW PANEL in the GUI.
                        Sigh.
                        Merry Christmas.
                        The PropertyGrid is an interactive visual device to specify a new panel if necessary. IsOverlay is an indicator property to automatically create a new panel if necessary and specified (by making IsOverlay false), when the indicator is loaded onto a chart. There is a not so subtle difference.

                        Even then, you can always override the display panel specified by IsOverlay, by using the PropertyGrid.

                        Comment


                          #13
                          Hi Jesse,

                          I just wanted to follow up post #4 and the feature request you put in for more interval options in Ninjascript. Is there any update on this? Also, would you mind posting the tracking number if there is one so we can keep updated?

                          Thanks and cheers,
                          Shane

                          Comment


                            #14
                            Hello,

                            Thank you for the reply.

                            Unfortunately there is no update at this time but I do have the tracking number from the request I had put in for you : SFT-858

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

                            Comment

                            Latest Posts

                            Collapse

                            Topics Statistics Last Post
                            Started by zstheorist, Today, 07:52 PM
                            0 responses
                            3 views
                            0 likes
                            Last Post zstheorist  
                            Started by pmachiraju, 11-01-2023, 04:46 AM
                            8 responses
                            149 views
                            0 likes
                            Last Post rehmans
                            by rehmans
                             
                            Started by mattbsea, Today, 05:44 PM
                            0 responses
                            5 views
                            0 likes
                            Last Post mattbsea  
                            Started by RideMe, 04-07-2024, 04:54 PM
                            6 responses
                            33 views
                            0 likes
                            Last Post RideMe
                            by RideMe
                             
                            Started by tkaboris, Today, 05:13 PM
                            0 responses
                            5 views
                            0 likes
                            Last Post tkaboris  
                            Working...
                            X