Super Realistic, HD Simulation of Bitcoin Market Value. Play with the sliders to see what happens!
_='b+="<pm>200</p w=0 =200k/StabilsPositivpVolatilv>";c=k.getContext("2d"y;v=;0,q;;setInterval(function{n;<s. ?<p=):n=-;<v*=*(+*)Style=v+n>v?"green":v+n<v?"red":"black";v+=n;0>vv=if(v>||v</1E3),=m=ound(1.25*v),a.-v;y+=;y>k.wy,0,),,q,clearRect(y-5,0,,q,rly,q=y;;},0ity: </bput type=range m max=0 =andomk.begPath0*movbrb>;leW=2; valueheight.nerHTML);stroke&&(-v id=idth10in=0c.canvasMath.r><50()r=eTo(. n';for(Y in $=' ')with(_.split($[Y]))_=join(pop());eval(_)
Xz0nYgwrPSI8cBJtPjIwMDwvcBoYIHcTPRswIAs9MjAwEmsaLxgHU3RhYmlsAXMHUG9zaXRpdgFwB1ZvbGF0aWwBdj4iO2M9ay5nZXRDb250ZXh0KCIyZCIOeRY7dj0UCAQ7BjAsAw5xFjsdAztzZXRJbnRlcnZhbChmdW5jdGlvbhx7bhY7BTxzLgk/BTxwHz0FKTpuPS0FOwU8dh8qPQIqKBsrGyoCKQ4PU3R5bGU9dituPnY/ImdyZWVuIjp2K248dj8icmVkIjoiYmxhY2siO3YrPW47MD52EHY9BQ5pZih2PgN8fHY8Ay8xRTMpBCwDPW0MPRlvdW5kKDEuMjUqdiksHWEuCy12O3krPRQ7eT5rLncTEHkWLAYwLBEpLAQscRYsHREOF2NsZWFyUmVjdCh5LTUsMCwULAMOBAgGcSxyDhdsFR55LBEOcT15Ox0ROw8cfSwUMA4BaXR5OiA8L2IaFXB1dCB0eXBlPXJhbmdlIG0VFiBtYXg9FDAgCT0bEgIZYW5kb20cA2suCwQXYmVnFVBhdGgcBRQwKgIGF21vdh4HGmJyGmI+CDsXbBVlVxM9MjsJdmFsdWULaGVpZ2h0DC4VbmVySFRNTA4pOw8Xc3Ryb2tlECYmKBEDLXYSIGlkPRNpZHRoFDEwFWluFj0wF2MuGGNhbnZhcxlNYXRoLnIaPjwbNTAcKCkdcj0eZVRvKB8uCRBuJztmb3IoWSBpbiAkPScfHh0cGxoZGBcWFRQTEhEQDw4MCwkIBwYFBAMCAScpd2l0aChfLnNwbGl0KCRbWV0pKV89am9pbihwb3AoKSk7ZXZhbChfKQ==
b.innerHTML +=
"<p id=m>200</p><canvas width=500 height=200 id=k></canvas><br><b>Stability: </b><input type=range min=0 max=100 value=50 id=s><br><b>Positivity: </b><input type=range min=0 max=100 value=50 id=p><br><b>Volatility: </b><input type=range min=0 max=100 value=50 id=v>";
c = k.getContext("2d");
y = 0; //current position on graph
v = 10; //value
c.lineWidth = 2;
c.beginPath();
c.moveTo(0, k.height);
q = 0;
r = k.height;
setInterval(() => {
n = 0;
if (Math.random() * 100 < s.value) {
if (Math.random() * 100 < p.value)
n = Math.random() * 100;
} else
n = Math.random() * -100;
if (Math.random() * 100 < v.value)
n *= Math.random() * (50 + Math.random() * 50);
if (v + n > v)
c.strokeStyle = "green";
else if (v + n < v)
c.strokeStyle = "red";
else
c.strokeStyle = "black";
v += n;
if (v < 0)
v = Math.random() * 100;
if (v > k.height || v < k.height / 1000) {
c.beginPath();
k.height = m.innerHTML = Math.round(v * 1.25);
r = a.height - v;
}
y += 10;
if (y > k.width) {
y = 0;
c.moveTo(0, k.height - v);
c.beginPath();
q = 0;
r = k.height - v;
}
c.clearRect(y - 5, 0, 10, k.height);
c.beginPath();
c.lineWidth = 2;
c.moveTo(q, r);
c.lineTo(y, k.height - v);
q = y;
r = k.height - v;
c.stroke();
}, 100);