88 lines
2.1 KiB
JavaScript
88 lines
2.1 KiB
JavaScript
//
|
|
//class Backtesting {
|
|
// constructor() {
|
|
// this.height = height;
|
|
// }
|
|
//}
|
|
//
|
|
//class Trade {
|
|
// constructor() {
|
|
// this.height = height;
|
|
// }
|
|
//}
|
|
//class Strategies {
|
|
// constructor() {
|
|
// this.height = height;
|
|
// }
|
|
//}
|
|
//
|
|
//class Signals {
|
|
// constructor() {
|
|
// this.height = height;
|
|
// }
|
|
//}
|
|
//
|
|
//class Exchange_Info {
|
|
// constructor() {
|
|
// this.height = height;
|
|
// }
|
|
//}
|
|
//
|
|
//class Alerts {
|
|
// constructor() {
|
|
// this.height = height;
|
|
// }
|
|
//}
|
|
//
|
|
//class Header {
|
|
// constructor() {
|
|
// this.height = height;
|
|
// }
|
|
//}
|
|
//
|
|
//class Statistics {
|
|
// constructor() {
|
|
// this.height = height;
|
|
// }
|
|
//}
|
|
//
|
|
|
|
|
|
class User_Interface{
|
|
/* This contains all the code for our User interface.
|
|
The code is separated into classes that maintain and
|
|
provide the data and functionality of each panel of
|
|
the UI. */
|
|
constructor() {
|
|
|
|
/* Data object is responsible for fetching and maintaining
|
|
up-to-date configurable and variable data for the UI */
|
|
this.data = new Data();
|
|
|
|
/* Charts object is responsible for maintaining the
|
|
data visualisation area in the UI. */
|
|
let chart_init_data = {
|
|
chart1_id : this.data.chart1_id,
|
|
chart2_id : this.data.chart2_id,
|
|
chart3_id : this.data.chart3_id,
|
|
trading_pair : this.data.trading_pair,
|
|
price_history : this.data.price_history
|
|
}
|
|
this.charts = new Charts(chart_init_data);
|
|
|
|
/* The Indicators object is responsible for interactions with
|
|
the edit indicator menu and updating the display on the charts.*/
|
|
let ind_init_data = {
|
|
indicators: this.data.indicators,
|
|
indicator_data: this.data.indicator_data
|
|
}
|
|
/* Pass the initialization for the indicators and a reference to
|
|
the charts object so the indicators can update it directly.*/
|
|
this.indicators = new Indicators(this.charts, ind_init_data);
|
|
this.data.set_i_updates(this.indicators.update);
|
|
/* The object that handles the interface controls.*/
|
|
this.controls = new Controls();
|
|
}
|
|
}
|
|
UI = new User_Interface();
|