Monday, March 13, 2017

get a chart

function getachart() {

function thelisting() {
var thecurrentlistnote = document.getElementById("sns20170311sa1558thecurrentlistnote")
var thecurrentlistnotearray = thecurrentlistnote.innerHTML.split(" ")
var thecurrentlisttype = thecurrentlistarray[0]
var thelist = document.getElementById("sns20170311sa1558" + thecurrentlisttype)
var thelistarray = thelist.innerHTML.split("<br />")
var thischart = document.getElementById("sns20170311sa1558this" + thecurrentlisttype)
var thechartnumber = parseInt(thischart.innerHTML)
var thislisting = thelistarray[thechartnumber]
return thislisting}

var thelisting = thelisting()
var theurl = theurl(thelisting)
if (theurl[0] != "h") {
theurl = gettheupdater(theurl)}
document.getElementById("sns20170311sa1558i").src = theurl
var

function gettheupdater() {
var thecurrentlist = document.getElementById("sns20170311sa1558thecurrentlist")
var thelistarray = thecurrentlist.innerHTML.split(" ")
var thelisttype = thelistarray[0]
var thesymbol = document.getElementById("sns20170311sa1558current" + thelisttype + "symbol")
var chartspan = document.getElementById("sns20170311sa1558chartspan")
var thischartspan = parseInt(chartspan.innerHTML)
var updaterbase = "http://elite.finviz.com/chart.ashx?t="
var updatertopliteral = "&ty=c&ta=0&p=i3&s=l &ty=c&ta=0&p=i15&s=l &ty=c&ta=st_c,sch_200p,sma_50,sma_200,sma_20&p=d&s=l &ty=c&ta=0&p=w&s=l &ty=c&ta=0&p=m&s=l"
var updatertoparray = updatertopliteral.split(" ")
return updaterbase + thesymbol + updatertoparray[thischartspan]}

function thesymbol(thelisting) {
var thelistingarray = thelisting.split(" ")
if (thelistingarray[0][0] === "h") {
return thelistingarray[0].split(

No comments:

Post a Comment