function realtime_price(a,b,c){fetch("https://api.binance.com/api/v3/ticker/24hr?symbol="+a+"USDT",{method:"GET",credentials:"same-origin"}).then(function(a){return a.json()}).then(function(a){price=parseFloat(a.lastPrice),price_chg=parseFloat(a.priceChange),price_pct_chg=parseFloat(a.priceChangePercent),a.priceChange>=0?(document.getElementById("price_"+c).style.color="#ccff33",document.getElementById("chg_"+c).style.color="#ccff33",document.getElementById("pct_chg_"+c).style.color="#ccff33"):(document.getElementById("price_"+c).style.color="#ff9933",document.getElementById("chg_"+c).style.color="#ff9933",document.getElementById("pct_chg_"+c).style.color="#ff9933"),document.getElementById("price_"+c).innerHTML=add_commas(price),document.getElementById("chg_"+c).innerHTML=add_commas(price_chg),document.getElementById("pct_chg_"+c).innerHTML="("+add_commas(price_pct_chg,dec=2)+"%)",cal_price_estimation(price,data[b])}).catch(function(a){console.log(a)})}function realtime_signals(c,a="L",d,e,b){document.getElementById("red_"+a+"_"+b).style.backgroundColor="#1a0000",document.getElementById("orange_"+a+"_"+b).style.backgroundColor="#1a1400",document.getElementById("green_"+a+"_"+b).style.backgroundColor="#051405",fetch("https://api.binance.com/api/v3/klines?symbol="+c+"USDT&interval="+({L:"1h",S:"5m"})[a]+"&limit=1000",{method:"GET",credentials:"same-origin"}).then(function(a){return a.json()}).then(function(g){let f=g.map(a=>parseFloat(a[4])),c=make_signal_last(f,a,d,e);document.getElementById("red_"+a+"_"+b).style.backgroundColor=c.red,document.getElementById("orange_"+a+"_"+b).style.backgroundColor=c.orange,document.getElementById("green_"+a+"_"+b).style.backgroundColor=c.green,"L"===a&&(document.getElementById("spike_chart_"+b).innerHTML=draw_spike_chart(f.slice(-168)))}).catch(function(a){console.log(a)})}function dashboard_spike(a){for(i=0;iparseFloat(a[4]));document.getElementById(b).innerHTML=draw_spike_chart(c)}).catch(function(a){console.log(a)})}