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

Xml Error when opening NTWindow

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

  • NinjaTrader_ChelseaB
    replied
    Hello fx.practic,

    I've received tracking ID #SFT-3622 for your request for IWorkspacePersistance and NTWindow to be supported with AddOn subclasses.

    Please note it is up to the NinjaTrader Development to decide if or when any request will be implemented.

    We appreciate your feedback.

    Leave a comment:


  • fx.practic
    replied
    Thank You, Chelsea.

    Leave a comment:


  • NinjaTrader_ChelseaB
    replied
    Hello fx.practic,

    Below is a link to an example of opening an addon window from an indicator and passing information back and forth.


    I will submit your feature request to allow sub classes to implement IWorkspacePersistance.

    Leave a comment:


  • fx.practic
    replied
    Hello Chelsea,

    I would appreciate to get an example.

    I need just simple small notification window.
    So, I mean, I'd like to be able to declare NTWindow in my custom Indicator (it can be done with usual WPF window).
    Just to avoid excess definitions in global namespaces.

    Also, I want to submit a feature request to allow classes that implement IWorkspacePersistance to be sub classes.

    Thank You

    Leave a comment:


  • NinjaTrader_ChelseaB
    replied
    Hello fx.practic,

    I'm not certain that I am understanding. You are trying to make an Addon that inherits from NTWindow and also have this be in the NinjaScript.Indicator namespace?

    This is not supported and not advised.

    Are you trying to open an addon window from a indicator? (I have an example that demonstrates this)

    Leave a comment:


  • fx.practic
    replied
    Hello Chelsea, thank You for the answer.

    I don't want to implement IWorkspacePersistance, only derive from NTWindow.
    I move my class outside Indicator class, inside Indicators namespace and it starts work.
    I was able to make my class private and to use parameters in window constructor.

    And Yes, please, submit feature to let custom classes, derived from NTWindow and implemented IWorkspacePersistance, to be nested (at least, inside Indicator and Strategy class).

    I believe this would be a good approach meaning encapsulation ideology.
    Last edited by fx.practic; 11-06-2018, 03:06 AM.

    Leave a comment:


  • NinjaTrader_ChelseaB
    replied
    Hello fx.practic,

    NTEIGHT-10802 is not marked as corrected and was not listed in the release notes as corrected. This is marked as expected.

    To confirm, your addon class is a subclass is this correct?

    As this was marked as expected, I am happy to submit a feature request to allow classes that implement IWorkspacePersistance to be sub classes if you would like.

    Leave a comment:


  • fx.practic
    replied
    Hello
    I have absolutely same problem in 8.0.16.2 64-bit today.
    Does bus still not fixed, of am I just not lucky?

    Leave a comment:


  • NinjaTrader_JessicaP
    replied
    I have an update regarding NTEIGHT-10802. We have encountered a limitation in the underlying C# technology which we will be clearly documenting :
    1. any class which derives from NTWindow or implements IWorkspacePersistance cannot be a nested class of another class
    2. any class which derives from NTWindow or implements IWorkspacePersistance must have a default constructor

    By default constructor, we mean a constructor which takes no arguments. In your code you will see a nested class near line 329. You will need to refactor your code so that this class is in another file, or so its code is part of your outer class.


    Please let us know if there are any other ways we can help.

    Leave a comment:


  • NinjaTrader_JessicaP
    replied
    Thank you for your report, and for the updated code.


    This behavior was confirmed on our end. We will be investigating this further. Please keep an eye on the NinjaTrader 8 Release Notes page for updates and bugfixes.





    Tracking ID: NTEIGHT-10802

    Leave a comment:


  • toptrader
    replied
    I followed your instructions, but I did not receive any dialogs about needing to recompile any dlls. I am still getting the same error after the uninstall and reinstall. Are you seeing the error on your end if you try to run the add on?

    Leave a comment:


  • NinjaTrader_JessicaP
    replied
    Thank you for this update, toptrader. It looks like we have successfully removed the unprintable characters from your code. Since you are still seeing these messages, this means that your compiler is probably adding these characters. We can try to repair your compiler with a complete reinstall.

    Please follow these steps to completely uninstall and reinstall NinjaTrader 8 on your system.


    • Download a fresh copy of NinjaTrader 8 from ninjatrader.com
    • Close NinjaTrader 8
    • Rename your (My) Documents\NinjaTrader 8\db\NinjaTrader.sdf file so it becomes (My) Documents\NinjaTrader 8\db\NinjaTrader.20161122.sdf
    • Rename your (My) Documents\NinjaTrader 8 folder so it becomes (My) Documents\NinjaTrader 8 - 20161122
    • Use the installer you downloaded to uninstall, and then reinstall, NinjaTrader 8
    • Copy these files and folders from your NinjaTrader 8 - 20161122 folder to your NinjaTrader 8 folder, under (My) Documents. If asked to replace files, always select "yes"
      • Config.xml
      • UI.xml
      • workspaces
      • templates
      • all .dll files in bin\Custom except these :
        • NinjaTrader.Custom.dll
        • NinjaTrader.Vendor.dll

      • all .cs files in bin\Custom except these :
        • NinjaTrader.Custom.cs
        • NinjaTrader.Vendor.cs
        • AssemblyInfo.cs

      • any subfolder of bin\Custom that has a .cs file that does not start with an @ sign

    • Start NinjaTrader 8. You will receive some dialogs about Ninja being unable to start because it needed to recompile some dlls. OK out of these dialogs
    • Start NinjaTrader 8 once more

    Leave a comment:


  • toptrader
    replied
    OK. I have completely removed the lines of code where you are seeing extra characters, but I am still seeing the issue. I have attached the latest code I am using.
    Attached Files

    Leave a comment:


  • NinjaTrader_JessicaP
    replied
    The editor I typically use, gvim when I am on windows, reveals the attached image. The left image is your original code, the right image is the modified code that I returned to you. For your benefit, I am also attaching hex dumps of both files to this reply. There are interesting characters around byte 0x1800.

    Please ensure that you are loading the file you originally attached to your first reply into Notepad++ should you test in Notepad++, and not any files you have modified or copy / pasted into. It is important to do so, because it may be the case that your compiler or editor is adding garbage characters.

    Have you had the same results when you use the code I sent you directly, rather than copying and pasting in?
    Attached Files

    Leave a comment:


  • toptrader
    replied
    I downloaded Notepad++, but I am still not seeing any extra characters.



    Attached Files

    Leave a comment:

Latest Posts

Collapse

Topics Statistics Last Post
Started by cmtjoancolmenero, Yesterday, 03:58 PM
1 response
17 views
0 likes
Last Post NinjaTrader_Gaby  
Started by benmarkal, Yesterday, 12:52 PM
3 responses
23 views
0 likes
Last Post NinjaTrader_Gaby  
Started by helpwanted, Today, 03:06 AM
1 response
20 views
0 likes
Last Post sarafuenonly123  
Started by Brevo, Today, 01:45 AM
0 responses
11 views
0 likes
Last Post Brevo
by Brevo
 
Started by pvincent, 06-23-2022, 12:53 PM
14 responses
244 views
0 likes
Last Post Nyman
by Nyman
 
Working...
X