Bug Fixed

This commit is contained in:
Luis Fernando Molina committed 2020-09-05 11:49:40 +02:00
1 parent a7f3be7629
commit 9049ca7e75
5 files changed
+39 -25

No files matched your search

+1 -1
View File
@@ -14189,7 +14189,7 @@
"config": true
},
"initialValues": {
"config": "{ \n\"paragraphs\": \n[\n\"\",\n\"\",\n\"\" \n], \n\"done\": false\n}"
"config": "{ \n\"title\": \"\",\n \"summary\": \"\",\n \"subTitle\": \"\",\n \"image\": \"\",\n \"definition\": \"\",\n \"bulletPointIntro\": \"\",\n \"bulletArray\": \n[\n [\"\", \"\"], \n[\"\", \"\"], \n[\"\", \"\"] \n],\n \"paragraph1\": \"\",\n \"callOut\": \"\",\n \"paragraph2\": \"\",\n \"note\": \"\",\n \"tip\": \"\",\n \"important\": \"\",\n \"note\": \"\" \n}"
},
"referenceAttachesTo": {
"compatibleTypes": "->*Any Node*->"
+6 -7
View File
@@ -59,8 +59,7 @@
<table class="tutorial-definitionTable">
<tr>
<td>
<img
src="https://julian-molina.github.io/Documentation/images/icons/nodes/png150/trading-engine.png" />
<img width="150" height="150" src="Images/Icons/style-01/crypto-exchanges.png" />
</td>
<td>
<strong class="tutorial-saira-bold-small">The trading engine hierarchy is t ible and exposed to others.</strong>
@@ -77,12 +76,12 @@
</li>
</ul>
<p class="tutorial-saira-small">The hierarchyusers.</p>
<div class="tutorial-saira-bold-small tutorial-callout"> callout text.</div>
<div class="tutorial-saira-bold-small tutorial-callout" > callout text.</div>
<p class="tutorial-saira-small">The hiera feedback capabilities to users.</p>
<div class="tutorial-alert-info" role="alert"><i class="tutorial-fa tutorial-info-circle"></i> <b>Note:</b> Esto es una nota, algonoteworthy.</div>
<div class="tutorial-alert-success" role="alert"><i class="tutorial-fa tutorial-check-square-o"></i> <b>Tip:</b> Esto es un tip. </div>
<div class="tutorial-alert-warning" role="alert"><i class="tutorial-fa tutorial-warning"></i> <b>Important:</b> Esto es algo importante.</div>
<div class="tutorial-alert-danger" role="alert"><i class="tutorial-fa tutorial-exclamation-circle"></i> <b>Warning:</b> Esto es una aviso de alerta.</div>
<div class="tutorial-saira-bold-small tutorial-alert-info" role="alert"><i class="tutorial-fa tutorial-info-circle"></i> <b>Note:</b> Esto es una nota, algonoteworthy.</div>
<div class="tutorial-saira-bold-small tutorial-alert-success" role="alert"><i class="tutorial-fa tutorial-check-square-o"></i> <b>Tip:</b> Esto es un tip. </div>
<div class="tutorial-saira-bold-small tutorial-alert-warning" role="alert"><i class="tutorial-fa tutorial-warning"></i> <b>Important:</b> Esto es algo importante.</div>
<div class="tutorial-saira-bold-small tutorial-alert-danger" role="alert"><i class="tutorial-fa tutorial-exclamation-circle"></i> <b>Warning:</b> Esto es una aviso de alerta.</div>
</div>
</div>
</body>
+13 -8
View File
@@ -58,6 +58,7 @@
border-radius: 4px;
margin: 20px 0;
border-top-color: #a6e1ec;
width: 95%;
}
.tutorial-alert-success {
@@ -68,7 +69,8 @@
border: 1px solid transparent;
border-radius: 4px;
margin: 20px 0;
border-top-color: #c9e2b3
border-top-color: #c9e2b3;
width: 95%;
}
.tutorial-alert-warning {
@@ -79,7 +81,8 @@
border: 1px solid transparent;
border-radius: 4px;
margin: 20px 0;
border-top-color: #f7e1b5
border-top-color: #f7e1b5;
width: 95%;
}
.tutorial-alert-danger {
@@ -90,7 +93,8 @@
border: 1px solid transparent;
border-radius: 4px;
margin: 20px 0;
border-top-color: #e4b9c0
border-top-color: #e4b9c0;
width: 95%;
}
.tutorial-callout {
@@ -101,6 +105,7 @@
border-radius: 3px;
border-left-color: #bcd643;
font-weight: 500;
width: 92%;
}
.tutorial-info-circle:before {
@@ -120,7 +125,7 @@
}
.tutorial-fa {
display:inline-block;
font:normal normal normal 14px/1 FontAwesome;
font-size:inherit;
text-rendering:auto;
@@ -129,7 +134,7 @@
}
.tutorial-saira-small {
display:inline-block;
font:normal normal normal 14px/1 "Saira";
font-size:inherit;
text-rendering:auto;
@@ -138,7 +143,7 @@
}
.tutorial-saira-medium {
display:inline-block;
font:normal normal normal 30px/1 "Saira";
text-rendering:auto;
-webkit-font-smoothing:antialiased;
@@ -146,7 +151,7 @@
}
.tutorial-saira-large {
display:inline-block;
font:bold normal normal 40px/1 "Saira";
text-rendering:auto;
-webkit-font-smoothing:antialiased;
@@ -154,7 +159,7 @@
}
.tutorial-saira-bold-small {
display:inline-block;
font:bold normal normal 14px/1 "Saira";
font-size:inherit;
text-rendering:auto;
@@ -3,7 +3,7 @@ function newTutorialFunctions() {
play: play
}
const HEIGHT = 800
const WIDTH = 600
const WIDTH = 500
const MARGIN = 300
return thisObject
@@ -695,7 +695,6 @@ exports.newTradingOrders = function newTradingOrders(bot, logger, tradingEngineM
/* Status Checks */
if (order.remaining === 0 && order.status === AT_EXCHANGE_STATUS.CLOSED) {
/* Close this Order */
tradingEngineOrder.status.value = 'Closed'
tradingEngineOrder.exitType.value = 'Filled'
@@ -705,24 +704,29 @@ exports.newTradingOrders = function newTradingOrders(bot, logger, tradingEngineM
await updateEndsWithCycle(tradingEngineOrder)
tradingSystem.infos.push([tradingSystemOrder.id, 'checkExchangeEvents -> Closing Order with Exit Type ' + tradingEngineOrder.exitType.value])
await syncWithExchange(tradingEngineStage, tradingSystemOrder, tradingEngineOrder, order)
return
}
if (order.remaining > 0 && order.status === AT_EXCHANGE_STATUS.CLOSED) {
if (order.remaining > 0 && order.status === AT_EXCHANGE_STATUS.CLOSED) {
/* Close this Order */
tradingEngineOrder.status.value = 'Closed'
tradingEngineOrder.exitType.value = 'Closed at the Exchange'
/* Initialize this */
tradingEngine.current.episode.distanceToEvent.closeOrder.value = 1
await updateEndsWithCycle(tradingEngineOrder)
tradingSystem.infos.push([tradingSystemOrder.id, 'checkExchangeEvents -> Closing Order with Exit Type ' + tradingEngineOrder.exitType.value])
}
if (order.status === AT_EXCHANGE_STATUS.CANCELLED) {
await syncWithExchange(tradingEngineStage, tradingSystemOrder, tradingEngineOrder, order)
await recalculateStageSize(tradingEngineStage, tradingEngineOrder)
return
}
if (order.status === AT_EXCHANGE_STATUS.CANCELLED) {
/* Close this Order */
tradingEngineOrder.status.value = 'Closed'
/*
We must be carefull here not to overide an already defined exitType. It can happen
for instance that the order was cancellerd from the bot, but veryfing the cancellation
@@ -732,12 +736,15 @@ exports.newTradingOrders = function newTradingOrders(bot, logger, tradingEngineM
if (tradingEngineOrder.exitType.value === tradingEngineOrder.exitType.config.initialValue) {
tradingEngineOrder.exitType.value = 'Cancelled at the Exchange'
}
/* Initialize this */
tradingEngine.current.episode.distanceToEvent.closeOrder.value = 1
await updateEndsWithCycle(tradingEngineOrder)
tradingSystem.infos.push([tradingSystemOrder.id, 'checkExchangeEvents -> Closing Order with Exit Type ' + tradingEngineOrder.exitType.value])
await syncWithExchange(tradingEngineStage, tradingSystemOrder, tradingEngineOrder, order)
await recalculateStageSize(tradingEngineStage, tradingEngineOrder)
return
}
/*
@@ -749,7 +756,10 @@ exports.newTradingOrders = function newTradingOrders(bot, logger, tradingEngineM
await syncWithExchange(tradingEngineStage, tradingSystemOrder, tradingEngineOrder, order)
}
/* Forced Cancellation Check */
/*
Forced Cancellation Check: Here we check if we need to cancel this order because the
stage is closing.
*/
if (tradingEngineStage.status.value === 'Closing' && tradingEngineOrder.status.value !== 'Closed') {
await exchangeCancelOrder(tradingEngineStage, tradingSystemOrder, tradingEngineOrder, 'Closing Stage')
}