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

Issue with Entity Data Model

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

    Issue with Entity Data Model

    Hello Support Team,

    I have created an EDM based on the existing database. The .edmx file has been stored to NinjaTrader 8\bin\Custom folder.

    There are 2 errors appearing in the message boxes when I try to compile the main script in the NinjaScript Editor:

    1. Unable to load custom assembly. The given key was not present in the dictionary.
    2. Unable to retrieve type info for "NinjaTrader.NinjaScript.AddOnBase" from assembly "NinjaTrader.Custom". Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.

    Catching the exceptions with the code as follows gives no additional info:
    catch (ReflectionTypeLoadException ex)
    {
    foreach (var item in ex.LoaderExceptions)
    {
    MessageBox.Show(item.Message);
    }
    }

    Could you please help me to solve this issue?

    Kind regards,
    Denis

    #2
    Hello Denis,

    I am not familiar with .edmx files, however, if this is a script, this cannot be run in NinjaTrader. (If this is a plain text file, you might be able to use a StreamReader to read the file into script)

    Are you trying to make an addon internal to NinjaTrader using the NinjaScript Editor?
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hello Chelsea,

      thank you for your reply.

      I am familiar with the Stream Reader, it is not the case.

      I am trying to implement Entity Framework technology using Entity Data Model (.edmx) for the existing SQL Database. Here is the overview of that:
      The Entity Data Model describes the structure of data, regardless of its stored form, which addresses challenges resulting from storing data in many forms.


      If it is not applicable within NinjaScript, what is the recommended approach by NinjaTrader how to bridge a strategy script with a database?

      Denis

      Comment


        #4
        Hello Denis,

        Calling information from a database is outside of what is supported by NinjaTrader support to do.

        This thread will remain open for any community members that would like to assist.

        You can also contact one of our professional NinjaScript Consultants who would be eager to create or modify this script at your request or assist you with your script. Please let me know if you would like our business development follow up with you with a list of professional NinjaScript Consultants who would be happy to create this script or any others at your request.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Hello Chelsea,

          thank you. Yes, I will appreciate if your colleagues provide me with the list of consultants who might help me.

          Merry Christmas and happy new year!

          Denis

          Comment


            #6
            This is Brant from the NinjaTrader Ecosystem responding on behalf of my colleague Chelsea.

            I have provided a link below that will show you the NinjaTrader Ecosystem partners that provide NinjaScript Consulting services, you will need to contact each partner and inquire further regarding the quotes for prices for your custom NinjaScript ideas and work with the consultant directly:
            Search trading indicators, apps and services to personalize your NinjaTrader software. Explore custom trading indicators, automated strategies, free trading apps & more!


            Please let me know if you have any questions, concerns or if I can provide any further assistance by responding to this email at your convenience.
            BrantNinjaTrader Customer Service

            Comment


              #7
              Hello Brant,

              thank you for information.

              Kind regards,
              Denis

              Comment


                #8
                Even though this is an old thread, I wanted to potentially assist anyone else who might want to use entity framework. I got it to work using the Code First approach when adding the connection through the wizard in Visual Studio. I understand the convenience of using ORMs in that it allows the developer to write code that fluidly interacts with the data. I really never want to write SQL within code. The only drawback to Code First is that the UI for refreshing the tables does not exist. But the table structure can easily be updated by typing any changes in the generated models. I don't know why the default approach to adding EDMX models doesn't work. Something kept refreshing and overwriting my models and then I would also get errors regarding ambiguous objects. But at this point I think the Code First approach is just as intuitive.

                Comment


                  #9
                  Hi Hernando,
                  Does this approach allow data connections to move data to and from NT into and out of your own SQL Server?

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by BarzTrading, Today, 07:25 AM
                  2 responses
                  15 views
                  1 like
                  Last Post BarzTrading  
                  Started by devatechnologies, 04-14-2024, 02:58 PM
                  3 responses
                  19 views
                  0 likes
                  Last Post NinjaTrader_BrandonH  
                  Started by tkaboris, Today, 08:01 AM
                  0 responses
                  3 views
                  0 likes
                  Last Post tkaboris  
                  Started by EB Worx, 04-04-2023, 02:34 AM
                  7 responses
                  162 views
                  0 likes
                  Last Post VFI26
                  by VFI26
                   
                  Started by Mizzouman1, Today, 07:35 AM
                  1 response
                  10 views
                  0 likes
                  Last Post NinjaTrader_Gaby  
                  Working...
                  X