Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Unable to use Google Drive API for logging

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

    Unable to use Google Drive API for logging

    I have a test running that basically writes my trades to an online file on Google Drive. I compiled it for .Net 3.5 but when attempting to make the same call from within my strategy it fails upon loading:

    8/3/2013 09:43:27 Strategy Failed to call method 'Initialize' for strategy 'CrazyIvan/952decfdd22c4def90ab358404f8cb5d': Could not load file or assembly 'Google, Version=1.0.4963.15190, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
    'Google' is the .Net 3.5 DLL I produced and I can only suspect that it is unable to load one or more of the other references which are needed (and which I have added to my resources):



    I am pretty certain this are not 4.0 or higher DLLs as I just wrote this test:

    Assembly a = Assembly.ReflectionOnlyLoadFrom("Google.dll");
    Console.WriteLine(a.ImageRuntimeVersion);
    a = Assembly.ReflectionOnlyLoadFrom("Google.GData.Clie nt.dll");
    Console.WriteLine(a.ImageRuntimeVersion);
    a = Assembly.ReflectionOnlyLoadFrom("Google.GData.Exte nsions.dll");
    Console.WriteLine(a.ImageRuntimeVersion);
    a = Assembly.ReflectionOnlyLoadFrom("Google.GData.Spre adsheets.dll");
    Console.WriteLine(a.ImageRuntimeVersion);
    a = Assembly.ReflectionOnlyLoadFrom("Newtonsoft.Json.d ll");
    Console.WriteLine(a.ImageRuntimeVersion);
    a = Assembly.ReflectionOnlyLoadFrom("Google.GData.Acce ssControl.dll");
    Console.WriteLine(a.ImageRuntimeVersion);
    a = Assembly.ReflectionOnlyLoadFrom("Google.GData.Docu ments.dll");
    Console.WriteLine(a.ImageRuntimeVersion);
    And this was the output:

    $ ./GoogleTest.exe
    v2.0.50727
    v2.0.50727
    v2.0.50727
    v2.0.50727
    v2.0.50727
    v2.0.50727
    v2.0.50727
    So I have no idea why this should fail.


    Thanks!
    Last edited by molecool; 08-03-2013, 08:28 AM.

    #2
    Update

    Seems it cannot find my own library called 'Google' - I have tried to load the other ones into my strategy directly and it appears to be working. Google has sub references to those others and that's where it is breaking somehow.

    Comment


      #3
      Not working...

      I just created a very simple assembly, only containing a data object without outside references. Exported as a DLL and NT is still complaining about it. WTH!!

      I'm using SharpDevelop and I have it set to compile to .Net 3.5. This used to work fine but it's now blowing up on me.

      Comment


        #4
        I have now established that NO library that I create via SharpDevelop is recognized by aMember. I have tried SD 3.2.1 and SD 4.2.1. In both versions I can create an EMPTY resource with nothing but an empty class file. It always compiles just fine but when attempting to launch my strategy I get the same error message:

        8/3/2013 17:53:00 Strategy Failed to call method 'Initialize' for strategy 'CrazyIvan/bde418102bb147ac94530b0cbdfb403a': Could not load file or assembly 'LibTest, Version=1.0.4963.30280, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.

        I have enclosed the test project I created and I encourage you to compile and import it into Ninja. In order to reproduce this error make sure you call the constructor of the LibTest class:

        LibTest lb = new LibTest();

        It most definitely does not work with anything compiled with SharpDevelop.
        Last edited by NinjaTrader_PatrickH; 08-04-2013, 09:10 AM.

        Comment


          #5
          Yup...

          I downloaded VS 2010 Express and compiled my project as .Net 3.5 Client, then imported it into Ninja. Works fine now. So it wasn't anything in my code - this is something related to SharpDevelop. Which is weird as I used SD a few years ago and never had any problems. Go figure. If anyone has any suggestions - I'm all ears as I prefer using SD - less bloated than VS.

          Comment


            #6
            Hello molecool,

            Thank you for your post.

            Any programs outside of NinjaTrader to develop code for NinjaScript will unfortunately be unsupported. In addition, please make sure to keep in mind the upload guidelines set for this Forum including the following:
            3. You MAY ONLY post files in the NinjaScript Archive File (.zip) format which can be created via File > Utilities > Export NinjaScript menu.

            4. You MAY NOT post protected files (DLLs) or any NinjaScript code that references external DLL's.
            Please let me know if I may be of further assistance.

            Comment


              #7
              Originally posted by NinjaTrader_PatrickH View Post
              Hello molecool,

              Thank you for your post.

              Any programs outside of NinjaTrader to develop code for NinjaScript will unfortunately be unsupported. In addition, please make sure to keep in mind the upload guidelines set for this Forum including the following:

              Please let me know if I may be of further assistance.
              I did not post any DLLs - I posted the source of a test project so you guys could take a look at it yourself

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
              0 responses
              626 views
              0 likes
              Last Post Geovanny Suaza  
              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
              0 responses
              359 views
              1 like
              Last Post Geovanny Suaza  
              Started by Mindset, 02-09-2026, 11:44 AM
              0 responses
              105 views
              0 likes
              Last Post Mindset
              by Mindset
               
              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
              0 responses
              562 views
              1 like
              Last Post Geovanny Suaza  
              Started by RFrosty, 01-28-2026, 06:49 PM
              0 responses
              567 views
              1 like
              Last Post RFrosty
              by RFrosty
               
              Working...
              X