Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Changed the layout, and added some explanaitions to it. (not sure if …

…it's better though)
  • Loading branch information...
commit 6c4c97f8b02e53bf613602b9a601fee779e7fe42 1 parent 87cea18
@nisbus authored
Showing with 63 additions and 14 deletions.
  1. +63 −14 apps/monterl_carlo_websocket/priv/index.html
View
77 apps/monterl_carlo_websocket/priv/index.html
@@ -9,34 +9,77 @@
<h1>Monterl_Carlo</h1>
<div id="wrapper">
<div id="container">
- <div id="log">
+ <h2 id="log"></h2>
</div>
- <div id="chart" style="width:600px;height:300px; padding:0px;position:relative;">
+ <div style="float:left">
+ Welcome to the monterl carlo demo.</br>
+ Using the controls below you can chart data from the monte carlo simulation.</br>
+ A few things to note.</br>
+ When you create your simulation, try to use a unique name</br>
+ since there can only be one instance using each name at a time.</br>
+ If your name is in use you will see the application become disconnected. </br>
+ If that happens just refresh the application and try another name.</br>
+ Please remember to KILL your simulation before leaving.</br>
+ There are two ways for you to visualize your simulation:
+ <ul>
+ <li>Subscribe, plots realtime data</li>
+ <li>Graph, plots the number of points you ask it to</li>
+ </ul>
+ </br>
+ You can start things out by typing in a name, click CREATE and then subscribe.</br>
+ BTW sorry for the layout, if you'd like to change it please send me a pull request.
</div>
- <div id="symbol_ctrl" class="ctrls">
+ </div>
+ <h3>Simulation parameters</h3>
+ <div id="symbol_ctrl" class="ctrls" style="width=100px;float:left;">
+ <p>Symbol</br> (any name really, try to be unique)</br>
<input id="symbol" type="text" value="MARL" width="50px" >
+ <p>
<button id="btncreate">CREATE</button>
<button id="btnkill">KILL</button>
- </div>
- <div id="sub_ctrl">
- <input id="inprice" type="number" step="0.01" value="100.55"/>
- <input id="inprecision" type="number" value="5"/>
+
+ <p>Initial price</br>
+ <input id="inprice" type="number" step="0.01" value="100.55"/>
+ </p>
+ <p>Precision</br>
+ <input id="inprecision" type="number" value="5"/>
+ </p>
+ <p>Annual volatility</br>
<input id="annvol" type="number" value="0.1" step="0.1"/>
+ </p>
+ <p>Annual expected returns</br>
<input id="annret" type="number" value="0.1" step="0.1"/>
- <input id="interval" type="number" value="1000" step="100"/>
- <button id="btnsub">Subscribe</button>
- <button id="btnunsub">Unubscribe</button>
- </div>
- <div id="graph_ctrl">
- <input type="number" id="points" value="50" step="10"/>
+ </p>
+ </div>
+ <div>
+ <h4>Graph parameters</h4>
+ <p>Number of points to graph</br>
+ <input type="number" id="points" value="50" step="10"/>
+ </p>
+ <p>Data to plot (only plots the bids, </br>
+ whatever you choose</br>
+ (check the returned data for more info))</br>
<select id="graph_type">
<option value="bid">Bids</option>
<option value="ask">Asks</option>
<option value="both">Both</option>
<option value="stats">Statistics</option>
</select>
+ </p>
<button id="btngraph">Graph</button>
</div>
+
+ <div id="sub_ctrl" style="width:200px;float:left;">
+ <h3>Real time parameters</h3>
+ <p>Interval (ms)</br>
+ <input id="interval" type="number" value="1000" step="100"/>
+ </p>
+ <button id="btnsub">Subscribe</button>
+ <button id="btnunsub">Unubscribe</button>
+ </div>
+ <div id="chart" style="width:600px;height:300px; padding:0px;float:left">
+
+
</div>
</div>
@@ -107,7 +150,13 @@
};
};
function message(msg){
- $('#log').html(msg+'</p>')
+ $('#log').html(msg+'</p>');
+ var lbl = $('#log');
+ if(msg == "<p>connected"){
+ $('#log').css("color","green");
+ }else{
+ $('#log').css("color","red");
+ }
};
function plotit(seriesData){
Please sign in to comment.
Something went wrong with that request. Please try again.