Access to Google-Spreadsheet - futures io
futures io futures trading



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 2,999 views
    2. thumb_up 7 thanks given
    3. group 6 followers
    1. forum 10 posts
    2. attach_file 0 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 125,000 members
  • Genuine reviews from real traders, not fake reviews from stealth vendors
  • Quality education from leading professional traders
  • We are a friendly, helpful, and positive community
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts
  • We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

(If you already have an account, login at the top of the page)

 
Search this Thread
 

Access to Google-Spreadsheet

(login for full post details)
  #1 (permalink)
Cologne
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Mirus/Zen-Fire, Velocity/TT
Trading: Futures, Stocks
 
Posts: 10 since Jun 2009
Thanks: 29 given, 3 received

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

Journal Challenge February 2021 results (so far):
Competing for $1500 in prizes from Topstep
looks_oneSBtrader82 's Trading Journalby SBtrader82
(166 thanks from 30 posts)
looks_twoJust BEING a Trader: Letting Go!!by iqgod
(116 thanks from 33 posts)
looks_3Wisdom is Emptinessby Mtype
(68 thanks from 25 posts)
looks_4Deetee’s DAX Trading Journal (time based)by Deetee
(31 thanks from 17 posts)
looks_5Journal for peanuts1956by peanuts1956
(23 thanks from 13 posts)
 
 
(login for full post details)
  #3 (permalink)
Site Administrator
Swing Trader
Data Scientist & DevOps
Manta, Ecuador
 
Experience: Advanced
Platform: My own custom solution
Trading: Emini Futures
 
Big Mike's Avatar
 
Posts: 49,751 since Jun 2009
Thanks: 32,296 given, 97,495 received



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

For the best trading education, watch our webinars
Searching for trading reviews? Review this list

Follow us on Twitter, YouTube, and Facebook

Support our community as an Elite Member:
https://futures.io/elite/
Follow me on Twitter Visit my futures io Trade Journal Reply With Quote
 
(login for full post details)
  #4 (permalink)
Site Moderator
 
 
sam028's Avatar
 
Posts: 3,665 since Jun 2009
Thanks: 3,786 given, 4,494 received

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)
Follow me on Twitter Reply With Quote
 
(login for full post details)
  #5 (permalink)
Cologne
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Mirus/Zen-Fire, Velocity/TT
Trading: Futures, Stocks
 
Posts: 10 since Jun 2009
Thanks: 29 given, 3 received

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
 
(login for full post details)
  #6 (permalink)
Cologne
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Mirus/Zen-Fire, Velocity/TT
Trading: Futures, Stocks
 
Posts: 10 since Jun 2009
Thanks: 29 given, 3 received

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
 
(login for full post details)
  #7 (permalink)
Netherlands
 
Experience: Advanced
Platform: Ensign, Multicharts
Trading: SP500
 
Posts: 92 since Nov 2009
Thanks: 66 given, 57 received

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
 
(login for full post details)
  #8 (permalink)
Cologne
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Mirus/Zen-Fire, Velocity/TT
Trading: Futures, Stocks
 
Posts: 10 since Jun 2009
Thanks: 29 given, 3 received

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
 
(login for full post details)
  #9 (permalink)
Site Moderator
 
 
sam028's Avatar
 
Posts: 3,665 since Jun 2009
Thanks: 3,786 given, 4,494 received

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)
Follow me on Twitter Reply With Quote
The following user says Thank You to sam028 for this post:
 
(login for full post details)
  #10 (permalink)
Market Wizard
Paris
 
Experience: None
Platform: NinjaTrader
 
Posts: 1,247 since Oct 2009
Thanks: 272 given, 4,415 received


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
The following 5 users say Thank You to gomi for this post:
 
(login for full post details)
  #11 (permalink)
Cologne
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Mirus/Zen-Fire, Velocity/TT
Trading: Futures, Stocks
 
Posts: 10 since Jun 2009
Thanks: 29 given, 3 received

Thx gomi, putting the dlls in NT/bin folder works for me.
It displays the sheets in Output-Window.

Started this thread Reply With Quote
The following user says Thank You to DarthTrader for this post:


futures io Trading Community Platforms and Indicators NinjaTrader > Access to Google-Spreadsheet


Last Updated on January 28, 2012


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing
 

Journal Challenge w/$1500 prizes from Topstep!

February
 

Battlestations! Show us your trading desk - $1,500 in prizes!

March
 

Call Option Buying: The New Pain Trade? w/Carley Garner

Elite only
     



Copyright © 2021 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
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.
no new posts