-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
35 lines (28 loc) · 1.36 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<html>
<head>
<meta charset="UTF-8">
<title>Random course graph</title>
<script src="https://www.chartjs.org/dist/2.9.3/Chart.min.js"></script>
<script src="rcg.js"></script>
<link rel="stylesheet" href="style.css">
</head>
<body>
<section class="page-header">
<h1 class="project-name">Random Course Graph</h1>
<h2 class="project-tagline">a demonstration of a randomly generated course graph</h2>
</section>
<section class="main-content">
<p>
This pages shows a randomly generated chart of the price of a fictitious stock.
The aim is to illustrate that even a totally random graph can display features that may be mistaken for trends (which in the field of technical analysis may be called things like support, resistance and channels).
</p>
<button onclick="updadeChart();">Generate new random chart</button>
<div><canvas id="chartCanvas"></canvas></div>
<p>The graph is generated with a simple algorithm. In essence:</p>
<p><i>next value = current value * R()</i></p>
<p>where <i>R</i> is a function that generates a random number, distributed around 1.0 with a standard deviation of approximately 3%.</p>
<p>See <i>generateGraph()</i> in <a href="https://github.com/foolo/RandomCourseGraph/blob/master/rcg.js">rcg.js</a> for the exact implementation details.</p>
<p>This page was created by Olof Andersson – <a href="https://github.com/foolo">GitHub</a></p>
</section>
</body>
</html>