Mariam History set up
This commit is contained in:
1 parent
59662fe76a
commit
dbe04b9dea
7 files changed
+91
-16
No files matched your search
Binary file not shown.
@@ -39,6 +39,9 @@
|
||||
<Compile Include="Ecosystem.js">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="File.js">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="FileCloud.js">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
|
||||
function newFile() {
|
||||
|
||||
let fileObject = {
|
||||
getFile: getFile,
|
||||
initialize: initialize
|
||||
}
|
||||
|
||||
let fileCloud;
|
||||
let file;
|
||||
|
||||
return fileObject;
|
||||
|
||||
function initialize(pTeamCodeName, pBotCodeName, pProductCodeName, pLayerCodeName, pExchange, pMarket, callBackFunction) {
|
||||
|
||||
let product = ecosystem.getProduct(ecosystem.getBot(ecosystem.getTeam(pTeamCodeName), pBotCodeName), pProductCodeName);
|
||||
|
||||
if (product === undefined) {
|
||||
|
||||
throw "Product not found at this bot of the ecosystem! - pTeamCodeName = " + pTeamCodeName + ", pBotCodeName = " + pBotCodeName + ", pProductCodeName = " + pProductCodeName;
|
||||
|
||||
}
|
||||
|
||||
let exchange = ecosystem.getExchange(product, pExchange);
|
||||
|
||||
if (exchange === undefined) {
|
||||
|
||||
throw "Exchange not supoorted by this product of the ecosystem! - pTeamCodeName = " + pTeamCodeName + ", pBotCodeName = " + pBotCodeName + ", pProductCodeName = " + pProductCodeName + ", pExchange = " + pExchange;
|
||||
|
||||
}
|
||||
|
||||
let layer = ecosystem.getLayer(product, pLayerCodeName);
|
||||
|
||||
if (layer === undefined) {
|
||||
|
||||
throw "Layer not found at this product of the ecosystem! - pTeamCodeName = " + pTeamCodeName + ", pBotCodeName = " + pBotCodeName + ", pProductCodeName = " + pProductCodeName + ", pLayerCodeName = " + pLayerCodeName;
|
||||
|
||||
}
|
||||
|
||||
fileCloud = newFileCloud();
|
||||
fileCloud.initialize(pTeamCodeName, pBotCodeName);
|
||||
|
||||
/* Now we will get the file */
|
||||
|
||||
fileCloud.getFile(product, exchange, pMarket, undefined, undefined, onFileReceived);
|
||||
|
||||
function onFileReceived(pFile) {
|
||||
|
||||
file = pFile;
|
||||
|
||||
callBackFunction();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function getFile() {
|
||||
|
||||
return file;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -69,9 +69,9 @@ function newChartLayersPanel() {
|
||||
LAYER_NAMES.OLIVIA_CANDLES,
|
||||
LAYER_NAMES.OLIVIA_VOLUMES,
|
||||
LAYER_NAMES.TOM_CANDLE_STAIRS,
|
||||
LAYER_NAMES.TOM_VOLUME_STAIRS,
|
||||
LAYER_NAMES.MARIAM_TRADE_HISTORY,
|
||||
LAYER_NAMES.MARIAM_TRADES_DETAILS,
|
||||
LAYER_NAMES.MARIAM_TRADE_HISTORY,
|
||||
LAYER_NAMES.MARIAM_TRADE_HISTORY,
|
||||
LAYER_NAMES.ATH,
|
||||
LAYER_NAMES.HIGH_LOWS,
|
||||
LAYER_NAMES.FORECAST,
|
||||
|
||||
+1
-1
@@ -63,7 +63,7 @@ function newSplashScreen() {
|
||||
splashScreen.container.frame.draw(false, false);
|
||||
|
||||
let label = '' + Math.trunc(stepsInitializationCounter) + ' %';
|
||||
stepsInitializationCounter = stepsInitializationCounter + 0.3;
|
||||
stepsInitializationCounter = stepsInitializationCounter + 0.2;
|
||||
|
||||
if (stepsInitializationCounter > 99) { stepsInitializationCounter = 99;}
|
||||
|
||||
|
||||
+21
-13
@@ -131,9 +131,11 @@ function newTimelineChart() {
|
||||
|
||||
layerStatus = chartLayersPanel.getLayerStatus(chartLayersPanel.layerNames.OLIVIA_CANDLES);
|
||||
|
||||
layerAAMastersAAOliviaCandlesticks.initialize(DEFAULT_EXCHANGE, DEFAULT_MARKET, INITIAL_DATE, INITIAL_TIME_PERIOD, layerStatus, onOliviaCandlesInitialized);
|
||||
layerAAMastersAAOliviaCandlesticks.initialize(DEFAULT_EXCHANGE, DEFAULT_MARKET, INITIAL_DATE, INITIAL_TIME_PERIOD, layerStatus, onInizialized);
|
||||
|
||||
function onOliviaCandlesInitialized() {
|
||||
function onInizialized() {
|
||||
|
||||
console.log("loadCandles");
|
||||
|
||||
layerAAMastersAAOliviaCandlesticks.positionAtDatetime(INITIAL_DATE);
|
||||
loadVolumes();
|
||||
@@ -162,10 +164,11 @@ function newTimelineChart() {
|
||||
|
||||
layerStatus = chartLayersPanel.getLayerStatus(chartLayersPanel.layerNames.OLIVIA_VOLUMES);
|
||||
|
||||
layerAAMastersAAOliviaVolumes.initialize(DEFAULT_EXCHANGE, DEFAULT_MARKET, INITIAL_DATE, INITIAL_TIME_PERIOD, layerStatus, onOliviaVolumesInitialized);
|
||||
layerAAMastersAAOliviaVolumes.initialize(DEFAULT_EXCHANGE, DEFAULT_MARKET, INITIAL_DATE, INITIAL_TIME_PERIOD, layerStatus, onInizialized);
|
||||
|
||||
function onOliviaVolumesInitialized() {
|
||||
function onInizialized() {
|
||||
|
||||
console.log("loadVolumes");
|
||||
loadCandleStairs();
|
||||
|
||||
}
|
||||
@@ -193,10 +196,11 @@ function newTimelineChart() {
|
||||
|
||||
layerStatus = chartLayersPanel.getLayerStatus(chartLayersPanel.layerNames.TOM_CANDLE_STAIRS);
|
||||
|
||||
layerAAMastersAATomCandleStairs.initialize(DEFAULT_EXCHANGE, DEFAULT_MARKET, INITIAL_DATE, INITIAL_TIME_PERIOD, layerStatus, onOliviaCandlesInitialized);
|
||||
layerAAMastersAATomCandleStairs.initialize(DEFAULT_EXCHANGE, DEFAULT_MARKET, INITIAL_DATE, INITIAL_TIME_PERIOD, layerStatus, onInizialized);
|
||||
|
||||
function onOliviaCandlesInitialized() {
|
||||
function onInizialized() {
|
||||
|
||||
console.log("loadCandleStairs");
|
||||
loadVolumeStairs();
|
||||
|
||||
}
|
||||
@@ -225,12 +229,12 @@ function newTimelineChart() {
|
||||
|
||||
layerStatus = chartLayersPanel.getLayerStatus(chartLayersPanel.layerNames.TOM_VOLUME_STAIRS);
|
||||
|
||||
layerAAMastersAATomVolumeStairs.initialize(DEFAULT_EXCHANGE, DEFAULT_MARKET, INITIAL_DATE, INITIAL_TIME_PERIOD, layerStatus, onOliviaVolumeStairsInitialized);
|
||||
layerAAMastersAATomVolumeStairs.initialize(DEFAULT_EXCHANGE, DEFAULT_MARKET, INITIAL_DATE, INITIAL_TIME_PERIOD, layerStatus, onInizialized);
|
||||
|
||||
function onOliviaVolumeStairsInitialized() {
|
||||
function onInizialized() {
|
||||
|
||||
addLayers();
|
||||
splashScreenNeeded = false; // This is when we dont need a splash screen anymore!
|
||||
console.log("loadVolumeStairs");
|
||||
loadMariamHistory();
|
||||
|
||||
}
|
||||
|
||||
@@ -242,7 +246,7 @@ function newTimelineChart() {
|
||||
|
||||
let layerAAMastersAAMariamTradingHistory = newAAMastersAAMariamTradingHistory();
|
||||
|
||||
function loadVolumeStairs() {
|
||||
function loadMariamHistory() {
|
||||
|
||||
layerAAMastersAAMariamTradingHistory.container.displacement.parentDisplacement = timelineChart.container.displacement;
|
||||
layerAAMastersAAMariamTradingHistory.container.zoom.parentZoom = timelineChart.container.zoom;
|
||||
@@ -258,10 +262,11 @@ function newTimelineChart() {
|
||||
|
||||
layerStatus = chartLayersPanel.getLayerStatus(chartLayersPanel.layerNames.MARIAM_TRADE_HISTORY);
|
||||
|
||||
layerAAMastersAAMariamTradingHistory.initialize(DEFAULT_EXCHANGE, DEFAULT_MARKET, INITIAL_DATE, INITIAL_TIME_PERIOD, layerStatus, onOliviaVolumeStairsInitialized);
|
||||
layerAAMastersAAMariamTradingHistory.initialize(DEFAULT_EXCHANGE, DEFAULT_MARKET, INITIAL_DATE, INITIAL_TIME_PERIOD, layerStatus, onInizialized);
|
||||
|
||||
function onOliviaVolumeStairsInitialized() {
|
||||
function onInizialized() {
|
||||
|
||||
console.log("loadMariamHistory");
|
||||
addLayers();
|
||||
splashScreenNeeded = false; // This is when we dont need a splash screen anymore!
|
||||
|
||||
@@ -461,6 +466,8 @@ function newTimelineChart() {
|
||||
timelineChart.layers.push(layerAAMastersAAOliviaCandlesticks);
|
||||
timelineChart.layers.push(layerAAMastersAAOliviaVolumes);
|
||||
|
||||
timelineChart.layers.push(layerAAMastersAAMariamTradingHistory);
|
||||
|
||||
/* Connecting all layers to the panel that provides a user interface to turn them on - visible - off */
|
||||
|
||||
chartLayersPanel.container.eventHandler.listenToEvent("Layer Status Changed", layerAAMastersAAOliviaCandlesticks.onLayerStatusChanged);
|
||||
@@ -469,6 +476,7 @@ function newTimelineChart() {
|
||||
chartLayersPanel.container.eventHandler.listenToEvent("Layer Status Changed", layerAAMastersAATomCandleStairs.onLayerStatusChanged);
|
||||
chartLayersPanel.container.eventHandler.listenToEvent("Layer Status Changed", layerAAMastersAATomVolumeStairs.onLayerStatusChanged);
|
||||
|
||||
chartLayersPanel.container.eventHandler.listenToEvent("Layer Status Changed", layerAAMastersAAMariamTradingHistory.onLayerStatusChanged);
|
||||
}
|
||||
|
||||
/* Add all layers to the internal array */
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
<script type="text/javascript" src="AAMasters/AAMariam/Details.js"></script>
|
||||
|
||||
<script type="text/javascript" src="Ecosystem.js"></script>
|
||||
<script type="text/javascript" src="File.js"></script>
|
||||
<script type="text/javascript" src="FileServer.js"></script>
|
||||
<script type="text/javascript" src="FileCloud.js"></script>
|
||||
<script type="text/javascript" src="FileCache.js"></script>
|
||||
|
||||
Reference in new issue
Block a user