lcornwisky
Supremacy Member
- Joined
- Aug 29, 2013
- Messages
- 5,014
- Reaction score
- 1
lol lots of hardcore traders here!

i use this for sg stock prices
=importData("http://finance.yahoo.com/d/quotes.csv?s=es3.SI&f=l1")
function getYahooRTprice(symbol) {
var rtPriceStr=UrlFetchApp.fetch('http://finance.yahoo.com/q/ecn?s=' + symbol).getContentText();
rtPriceStr=rtPriceStr.replace(/\n/g,"");
var strlength=rtPriceStr.length;
var loc = rtPriceStr.search("time_rtq_ticker");
loc=rtPriceStr.indexOf(">",loc);
var loc2=rtPriceStr.indexOf("<",loc);
while (loc2-loc<=1 && loc2 < strlength) {
loc=rtPriceStr.indexOf(">",loc2);
loc2=rtPriceStr.indexOf("<",loc);
}
return rtPriceStr.substr(loc+1,loc2-loc-1)*1;
}
Seems like it is not accurate for bondsFor those using google spreadsheet that who want almost real time quote. Here is the google apps script that will scrape quote from Yahoo ecn e.g. http://finance.yahoo.com/q/ecn;?s=YHOO.
Just go to Tool > Script Editor and cust & paste.
Code:function getYahooRTprice(symbol) { var rtPriceStr=UrlFetchApp.fetch('http://finance.yahoo.com/q/ecn?s=' + symbol).getContentText(); rtPriceStr=rtPriceStr.replace(/\n/g,""); var strlength=rtPriceStr.length; var loc = rtPriceStr.search("time_rtq_ticker"); loc=rtPriceStr.indexOf(">",loc); var loc2=rtPriceStr.indexOf("<",loc); while (loc2-loc<=1 && loc2 < strlength) { loc=rtPriceStr.indexOf(">",loc2); loc2=rtPriceStr.indexOf("<",loc); } return rtPriceStr.substr(loc+1,loc2-loc-1)*1; }
For EOD, then use importdata.mine down too kan sianz
cannot see the value of my positions
heng is bull not bear day

end up now switch to manual keying in the stock prices
sianz
maybe everyday market close key in once
GG