" for (var i = 1; i < charts.length; i = i + 1) {addchart(code,charts[i])} function addchart(code,chart) { code = code + ''} }//addrecord input.value = code }//getpagecode
Wednesday, October 19, 2016
list man
function atnbg20161019w1654(instruction) {
var instruction = instruction.split("")
var itype = instruction[0]
var instruction = instruction[1]
var programname = "atnbg20161019w1654"
if (itype === "getpage") {getpage(programname)}
if (itype === "switch") {switch(programname,instruction)}
if (itype === "gottolink") {gotolink(instruction)}
if (itype === "pagecode") {pagecode(instruction)}
if (itype === "chartcode") {chartcode(instruction)}
odbase = "http://elite.finviz.com/chart.ashx?t=,&ty=c&ta=0&p=i3&s=l"
fdbase = "http://elite.finviz.com/chart.ashx?t=,&ty=c&ta=0&p=i15&s=l"
dlbase = "http://elite.finviz.com/chart.ashx?t=,&ty=c&ta=0&p=d&s=l"
oybase = "http://elite.finviz.com/chart.ashx?t=,&ty=c&ta=st_c,sch_200p,sma_50,sma_200,sma_20&p=d&s=l"
wlbase = "http://elite.finviz.com/chart.ashx?t=,&ty=c&ta=0&p=w&s=l"
tybase = "http://elite.finviz.com/chart.ashx?t=,&ty=c&ta=0&p=m&s=l"
basea = odbase + ";" + fdbase + ";" + dlbase + ";" + oybase + ";" + wlbase + ";" + tybase
basea = basea.split(";")
function getpage(programname) {
var list = document.getElementById(programname + "_l").value.split(",")
var page = document.getElementById(programname + "_p")
for (var i = 0; i < list.length; i = i + 1) {
var symbol = list[i]
addchart(symbol,page)}
function addchart(symbol,page) {
function space(page) {page.appendChild(document.createTextNode("\u00A0"))}
function break(page) {page.appendChild(document.createElement("br"))}
function button(page,href,color,label) {
var button = document.createElement("div")
page.appendChild(button)
var onmouseover = document.createAttribute("onmouseover")
button.setAttributeNode(onmouseover)
onmouseover.value = href
var style = document.createAttribute("style")
button.setAttributeNode(style)
style.value = "background-color:white;color:" + color
button.appendChild(document.createTextNode(label))}
function numberr(page,programname) {
var numberr = document.createElement("div")
page.appendChild(numberr)
var numberrid = document.createAttribute("id")
numberr.setAttributeNode(numberrid)
numberrid.value = programname + "_" + symbol + "_" + "chartnumber"
var chartnumber = document.createTextNode(3)
numberr.appendChild(chartnumber)}
function chart(page,symbol,programname) {
var chart = document.createElement("img")
page.appendChild(chart)
var src = document.createAttribute("src")
chart.setAttributeNode(src)
src.value = "http://elite.finviz.com/chart.ashx?t=" + symbol + "&ty=c&ta=st_c,sch_200p,sma_50,sma_200,sma_20&p=d&s=l"}
break(page);numberr(page,programname);chart(page,symbol,programname)
space(page);space(page);space(page);button(page,programname + "_plus()",pink,"+")
space(page);space(page);space(page);button(page,programname + "_minus()","pink","-")
break(page);space(page);button(page,programname + "_f()","burlywood","f")
space(page);space(page);button(page,programname + "_y()","burlywood","y")
space(page);space(page);button(page,programname + "_m()","burlywood","m")
space(page);input(page,programname)}
}
function switch(chart,basea,symbol,direction) {
var numberr = document.getElementById(programname + cnum)
var number = parseInt(numberr.innerHTML)
if (direction === "+") {if (number === 6) {number = 1} else {number = number + 1}}
else {if (number === 1) {number = 6} else {number = number - 1}}
chart = document.getElementById(programname + "_chart_" + symbol)
var box = basea[number - 1].split(",")
chart.src = box[0] + symbol + box[1]
numberr.innerHTML = number}
/*
function openInNewTab(url) {
var a = document.createElement("a");
a.target = "_blank";
a.href = url;
a.click();
}
//and then
openInNewTab("http://google.com");
http://stackoverflow.com/questions/4907843/open-a-url-in-a-new-tab-and-not-a-new-window-using-javascript
http://stackoverflow.com/users/2446799/adam-pietrasiak
*/
function getpagecode(programname,basea,symbol) {
var input = document.getElementById(programname + "_" + symbol + "_input")
var charts = input.value.split(",")
var code = ""
for (var i = 0; i < basea.length; i = i + 1) {
var box = basea[i].split(",")
chart(code,box)}
function chart(code,box) {
var src = box[0] + symbol + box[1]
code = code + ''}
addlinkset(code,linkbases,symbol)
function addlinkset(code,bases,symbol) {
" " + addlink(code,bases[0],symbol,"f")
" " +" " + " " + addlink(code,bases[1],symbol,"y")
" " +" " + " " + addlink(code,bases[2],symbol,"m")
function addlink(code,base,symbol,label) {
code = code + '' + label + ''}
}//addlinkset
var inputname = programname + "_" + symbol + "_input"
addrecord(code,inputname)
function addrecord(code,charts) {
code = code + "
" for (var i = 1; i < charts.length; i = i + 1) {addchart(code,charts[i])} function addchart(code,chart) { code = code + ''} }//addrecord input.value = code }//getpagecode
" for (var i = 1; i < charts.length; i = i + 1) {addchart(code,charts[i])} function addchart(code,chart) { code = code + ''} }//addrecord input.value = code }//getpagecode
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment