I would like to know if it is generally possibly to access Google-Spreadsheets from a NT-Strategy.
I downloaded the Data-API from Google, referenced all the dll-Files and tried to run a sample code.
The error I get is only the message that a reference is missing. No more errors in any logs or tracefiles.
The error occurs during runtime.
Is it possible to access a spreadsheet from a strategy? Does someone have a code sample for me?
That is the problem. the only message in output-window, logs or traces is:
**NT** Error on calling 'OnStartUp' method for strategy 'GoogleSpreadsheetTest/d0cc6e487abd4d7bbb5a92b8f4a3d16e': Die Datei oder Assembly "Google.GData.Spreadsheets, Version=1.9.0.0, Culture=neutral, PublicKeyToken=3f77feb76ff0d9a1" oder eine Abhängigkeit davon wurde nicht gefunden. Das System kann die angegebene Datei nicht finden.
**NT** Error on calling 'OnBarUpdate' method for strategy 'GoogleSpreadsheetTest/d0cc6e487abd4d7bbb5a92b8f4a3d16e': Die Datei oder Assembly "Google.GData.Spreadsheets, Version=1.9.0.0, Culture=neutral, PublicKeyToken=3f77feb76ff0d9a1" oder eine Abhängigkeit davon wurde nicht gefunden. Das System kann die angegebene Datei nicht finden.
Translationt: " ...Version 1.9.0.0 was not found or a reference to this file or assembly was not found ..."
I referenced the assemblies in the downloaded google-data-api:
C:\Programme\Google\Google Data API SDK\Redist\Google.GData.Client.dll
C:\Programme\Google\Google Data API SDK\Redist\Google.GData.Extensions.dll
C:\Programme\Google\Google Data API SDK\Samples\Google.GData.Spreadsheets.dll
I also tried to reference all the dlls in Redist-Folder from downloaded API, but the same error occured.
I tried to code the project in SharpDevelop 3.2. Everything works fine with referencing the Google.GData.Client.dll and Google.GDataSpreadsheets.dll. This is the code to show all documents in your Google-Docs account:
In NinjaTrader it doesn't work. I copied the dlls to NT/bin/Custom but always the same errot, that the dll reference is missing. The error occurs at runtime, when starting the strategy on a chart, compile works so far.
Yes ... and yes ... I guess the downloaded files are .Net dlls.
As I mentioned above, no errors in SharpDevelop, only NT seems to have
a problem with referencing the dlls. Compiling works fine, after starting the strategy
I see the error in output window.
If you look what Ninja does with process monitor (procmon.exe), you'll see it looks for external assemblies in the GAC (in windows\assembly) and NinjaTrader's bin folder (in Program Files).
So I think if you put the Google assemblies there, it should work better. A least it should load the assemblies.
On my PC I get AssemblyResolveEvents problems afterwards, but the asssemblies are loaded, and it may be specfic to my config though.
The following 5 users say Thank You to gomi for this post: