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

Example NinjaTraderAddOnProject Error in VS 2017

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

    Example NinjaTraderAddOnProject Error in VS 2017

    NinjaTrader 8.0.20.0 64-bit

    Downloaded the example NinjaTraderAddOnProject (http://ninjatrader.com/support/helpG...dOnProject.zip).

    Opened NinjaTraderAddOnProject.sln in Microsoft Visual Studio Professional 2017 Version 15.9.18+28307.960

    Selected AddOnPage.xaml

    Immediately generated an error in the Designer: Exception: Cannot create an instance of "NTTabPage_0".

    Click image for larger version  Name:	VS2017 Exception for NT8 AddOn.png Views:	0 Size:	88.8 KB ID:	1083480

    Advice gratefully received. Thanks.
    Last edited by jeronymite; 01-10-2020, 08:58 PM.
    Multi-Dimensional Managed Trading
    jeronymite
    NinjaTrader Ecosystem Vendor - Mizpah Software

    #2
    Hi jeronymite, thanks for your note.

    NT uses many custom WPF controls that are not Designer supported. The xaml page must be manually edited and loaded with your LoadXAML method defined in your addon.

    Please let me know if I can assist any further.
    Last edited by NinjaTrader_ChrisL; 01-14-2020, 09:21 AM. Reason: spelling
    Chris L.NinjaTrader Customer Service

    Comment


      #3
      Thanks, Chris.

      Can the example be enhanced to provide a fully working example, please? I can find no LoadXAML method in the example code, even though I can see some examples in the AddOn documentation.

      A fully working example will make it so very much easier to understand all the interactions and dependencies of the code, and encourage much wider development usage of the AddOn capability.

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

      Comment


        #4
        Hi jeronymit, thanks for your reply.

        I attached a simplified example of an addon in NT. The LoadXAML method is a local method definition that returns a DependencyObject, that is what gets used to fill the page content. I will also submit a feature request to add full designer support to the addon solution for Visual Studio.

        Please let me know if I can assist any further.
        Attached Files
        Chris L.NinjaTrader Customer Service

        Comment


          #5
          Thanks, Chris. Very much appreciate the feature request.

          I didn't see any attachment. Did I miss it?

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

          Comment


            #6
            Hello jeronymite,

            The attachment that Chris mentioned is a .zip file in post #4, its named "AddonShell_NT8B13 (1).zip", are you unable to see that? If you can't see that for some reason you can find that file additionally posted here: https://ninjatrader.com/support/foru...830#post759830

            If you instead meant the tracking ID for the request Chris will reply back with that once hes got it.

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

            Comment


              #7
              Thanks, Jesse.

              I meant I couldn't find the actual attachment to Chris's post. I cannot find it in the other post you reference either.

              I wondered if it might be a browser issue, but I've tried several different browsers, and with addons disabled.

              It's not the first time I've been unable to see attachments. I noticed this some time ago after the migration to the updated forum software.

              Are there direct links to attachments?

              Thanks.

              UPDATE: It seems attachments are not visible when the view of the thread is "Latest Activity". One has to switch to the "Posts" view, where the attachments are visible. ... I suggest this is not an intuitively obvious functional behaviour. Nonetheless, I now can see attachments. Thanks.
              Last edited by jeronymite; 01-17-2020, 02:22 AM. Reason: Updated Information
              Multi-Dimensional Managed Trading
              jeronymite
              NinjaTrader Ecosystem Vendor - Mizpah Software

              Comment


                #8
                Hi jeronymite, thanks for your patience,

                We are tracking your feature request as:

                SFT-4560

                Please check the release notes upon future updates to track added features:
                Chris L.NinjaTrader Customer Service

                Comment


                  #9
                  Many thanks, Chris!
                  Multi-Dimensional Managed Trading
                  jeronymite
                  NinjaTrader Ecosystem Vendor - Mizpah Software

                  Comment


                    #10
                    Trying to use VS2017 to implement the VS example AddOn. I receive the attached popup error when trying to "Start". I realise I need to follow the popup instructions, but being a relative newbie to VS, I would appreciate the process being explained, and included in the relevant NT8 documentation.

                    Grateful for assistance to complete the setup of the provided AddOn code in VS2017. Thanks!
                    Multi-Dimensional Managed Trading
                    jeronymite
                    NinjaTrader Ecosystem Vendor - Mizpah Software

                    Comment


                      #11
                      May I also request a complete code review of the sample AddOn examples (Basic and VS versions). Although very similar, the VS version contains code that seems much older than the Basic version and makes references to potential "future" functionality "after Beta 10". This particular observation occurs in line 694 of AddOnPage.xaml.cs in the VS version as follows:

                      Code:
                      //PropagateIntervalChange(args.BarsPeriod); THIS IS NOT AVAILABLE IN BETA 10, BUT WILL BE IN BETA 11. NEW VERSION WILL BE UPLOADED AT THAT TIME.
                      The Basic version also has significantly improved and safer code than the VS version in a variety of places.

                      Ideally, the AddOn examples, both Basic and VS, should be:
                      • Completely reviewed and updated to be fully consistent in code across the two
                      • Updated to take advantage of all the features and functionality of the latest version of NT8
                      • Enhanced with additional example code, e.g. selecting and creating/closing multiple different tabs, etc
                      • Enhanced with additional code robustness
                      • Available as equivalent XAML and C# code only versions
                      Also, the VS version should be:
                      • "Out-of-the-box" ready for VS compilation and Starting without additional VS actions to make that process happen seamlessly
                      • Fully Designer supported
                      I would love to create new and exciting NT8 AddOns. For now, I can use the Basic version, "cross-matched" against the VS version for comparison, to inform me of ways to do things, but it is not ideal or easy to work with, particularly from a Design perspective.

                      The improvements requested above would, I believe, lead to more uptake of AddOns being created, to the great benefit of individual users and the NT Community at large. The sooner this can happen, the better for all.

                      Many thanks!
                      Last edited by jeronymite; 03-08-2020, 04:24 PM.
                      Multi-Dimensional Managed Trading
                      jeronymite
                      NinjaTrader Ecosystem Vendor - Mizpah Software

                      Comment


                        #12
                        Hi jeronymite, thanks for the follow up.

                        I will compare the two scripts and let you know of any changes that will be made.

                        Thanks in advance for your patience.
                        Chris L.NinjaTrader Customer Service

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by DJ888, 04-16-2024, 06:09 PM
                        6 responses
                        18 views
                        0 likes
                        Last Post DJ888
                        by DJ888
                         
                        Started by Jon17, Today, 04:33 PM
                        0 responses
                        1 view
                        0 likes
                        Last Post Jon17
                        by Jon17
                         
                        Started by Javierw.ok, Today, 04:12 PM
                        0 responses
                        6 views
                        0 likes
                        Last Post Javierw.ok  
                        Started by timmbbo, Today, 08:59 AM
                        2 responses
                        10 views
                        0 likes
                        Last Post bltdavid  
                        Started by alifarahani, Today, 09:40 AM
                        6 responses
                        41 views
                        0 likes
                        Last Post alifarahani  
                        Working...
                        X