NexusFi: Find Your Edge


Home Menu

 





Access to Google-Spreadsheet


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one DarthTrader with 5 posts (1 thanks)
    2. looks_two sam028 with 2 posts (1 thanks)
    3. looks_3 Big Mike with 1 posts (0 thanks)
    4. looks_4 ehlaban with 1 posts (0 thanks)
    1. trending_up 6,946 views
    2. thumb_up 7 thanks given
    3. group 6 followers
    1. forum 10 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
 DarthTrader 
Cologne
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Mirus/Zen-Fire, Velocity/TT
Trading: Futures, Stocks
Posts: 10 since Jun 2009
Thanks Given: 29
Thanks Received: 4

Hi,

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?

Thx
DarthTrader


Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
No book, only a stair: journaling fills where price move …
Cryptocurrency
EA
Platforms and Indicators
My Rant with AMP Futures
Trading Reviews and Vendors
[WTS] ATAS Lifetime ULTRA license – EU buyers only – …
Platforms and Indicators
requesting .nrd replay files from 2026 spy and qqq
The Elite Circle
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Would you consider buying or leasing an algo?
4 thanks
Big Mike in Ecuador
4 thanks
Trading Journal (Neural Network Production Pipeline Mode …
4 thanks
Trading psychology articles
4 thanks
The Scalpers Journey
2 thanks
  #3 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 R.I.P. 1977-2026 
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,669 since Jun 2009
Thanks Given: 33,669
Thanks Received: 102,597



DarthTrader View Post
Hi,

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?

Thx
DarthTrader

Post the full error message.

Have you tried right-clicking in the editor window, and adding the reference (point to the DLL path)?

Mike




We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on X Visit my NexusFi Trade Journal Reply With Quote
  #4 (permalink)
 
sam028's Avatar
 sam028 
Site Administrator
 
Posts: 3,779 since Jun 2009
Thanks Given: 3,840
Thanks Received: 4,709

I created in the past a Strategy which was sending SMS (using Google agenda API ), it was working well.


Success requires no deodorant! (Sun Tzu)
Reply With Quote
  #5 (permalink)
 DarthTrader 
Cologne
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Mirus/Zen-Fire, Velocity/TT
Trading: Futures, Stocks
Posts: 10 since Jun 2009
Thanks Given: 29
Thanks Received: 4

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.

DT


Started this thread Reply With Quote
  #6 (permalink)
 DarthTrader 
Cologne
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Mirus/Zen-Fire, Velocity/TT
Trading: Futures, Stocks
Posts: 10 since Jun 2009
Thanks Given: 29
Thanks Received: 4

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:

 
Code
 
Console.WriteLine ("Connecting to Google Spreadsheets ...");
            
SpreadsheetsService service = new SpreadsheetsService("exampleCo-exampleApp-1");
service.setUserCredentials("USER", "PWD");
            
SpreadsheetQuery query = new SpreadsheetQuery();
SpreadsheetFeed feed = service.Query(query);

Console.WriteLine("Your spreadsheets:");
foreach (SpreadsheetEntry entry in feed.Entries)
{
       Console.WriteLine(entry.Title.Text);
}            
            
Console.Write("Press any key to continue . . . ");
Console.ReadKey(true);
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.

DT


Started this thread Reply With Quote
  #7 (permalink)
 ehlaban 
Netherlands
 
Experience: Advanced
Platform: Ensign, Multicharts
Trading: SP500
Posts: 91 since Nov 2009
Thanks Given: 66
Thanks Received: 57

Thinking ....
So you did include the references to ALL the dll's like Mike said?

Are they .Net dll's because otherwise it doesn't work i think ?!?!

also did you include the using namespaces in your Ninja script like

using Google.Application.etcetc


Reply With Quote
  #8 (permalink)
 DarthTrader 
Cologne
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Mirus/Zen-Fire, Velocity/TT
Trading: Futures, Stocks
Posts: 10 since Jun 2009
Thanks Given: 29
Thanks Received: 4

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.

Data-API-Download: https://code.google.com/archive/p/google-gdata/downloads
Data-API-Getting-Started: https://code.google.com/intl/de-DE/apis/spreadsheets/data/2.0/developers_guide_dotnet.html
Complete-Sample: https://google-gdata.googlecode.com/svn/trunk/clients/cs/samples/spreadsheets/spreadsheetdemo.cs


Started this thread Reply With Quote
  #9 (permalink)
 
sam028's Avatar
 sam028 
Site Administrator
 
Posts: 3,779 since Jun 2009
Thanks Given: 3,840
Thanks Received: 4,709

I tried myself too, and I have the same problem with this Spreadsheets.dll .
No idea, maybe @gomi have an idea ?


Success requires no deodorant! (Sun Tzu)
Reply With Quote
Thanked by:
  #10 (permalink)
 gomi 
Paris
Legendary Market Wizard
 
Experience: None
Platform: NinjaTrader
Posts: 1,270 since Oct 2009
Thanks Given: 282
Thanks Received: 4,507


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.


Reply With Quote




Last Updated on January 28, 2012


© 2026 NexusFi®, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Downloads - Top
no new posts