Rest of the Warnings Documented
This commit is contained in:
1 parent
6d7a0c7bd2
commit
b124192512
7 files changed
+396
-12
No files matched your search
+44
@@ -0,0 +1,44 @@
|
||||
{
|
||||
"topic": "TS LF Trading Bot Warnings",
|
||||
"pageNumber": "10",
|
||||
"type": "TS LF Trading Bot Warning - Skipping Cancel Order Event",
|
||||
"definition": {
|
||||
"text": "For some reason we could not check the order status at the exchange, so we can not know if we need to cancel it. In order to avoid with inconsistent information at the accounting level we did not evaluate the conditions of the Cancel Order Event.",
|
||||
"updated": 1611833530989
|
||||
},
|
||||
"paragraphs": [
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "This is normal behaviour you should not worry about. This warning is created in order to let you know that this happened and help you track the details of each trade.",
|
||||
"updated": 1611834454093
|
||||
},
|
||||
{
|
||||
"style": "Important",
|
||||
"text": "Skipping Cancel Order Event"
|
||||
},
|
||||
{
|
||||
"style": "Title",
|
||||
"text": "Context Info"
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "The following are the values of variables at the time this warning was created. They might be useful for you to understand what exactly happened."
|
||||
},
|
||||
{
|
||||
"style": "Placeholder",
|
||||
"text": "contextInfo"
|
||||
},
|
||||
{
|
||||
"style": "Title",
|
||||
"text": "Learn More"
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "To learn more about this topic, please read the following page:"
|
||||
},
|
||||
{
|
||||
"style": "List",
|
||||
"text": "Simulating Sync With the Exchange"
|
||||
}
|
||||
]
|
||||
}
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
{
|
||||
"topic": "TS LF Trading Bot Warnings",
|
||||
"pageNumber": "11",
|
||||
"type": "TS LF Trading Bot Warning - Order Size Value Zero Or Negative",
|
||||
"definition": {
|
||||
"text": "Even though we should have opened this order, we did not do it. The order could not be opened because it's size is Zero Or Negative.",
|
||||
"updated": 1611833651413
|
||||
},
|
||||
"paragraphs": [
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "This is normal behaviour you should not worry about. This warning is created in order to let you know that this happened and help you track the details of each trade.",
|
||||
"updated": 1611834477590
|
||||
},
|
||||
{
|
||||
"style": "Warning",
|
||||
"text": "Order Size Value Zero Or Negative"
|
||||
},
|
||||
{
|
||||
"style": "Title",
|
||||
"text": "Context Info"
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "The following are the values of variables at the time this warning was created. They might be useful for you to understand what exactly happened."
|
||||
},
|
||||
{
|
||||
"style": "Placeholder",
|
||||
"text": "contextInfo"
|
||||
},
|
||||
{
|
||||
"style": "Title",
|
||||
"text": "Learn More"
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "To learn more about this topic, please read the following page:"
|
||||
},
|
||||
{
|
||||
"style": "List",
|
||||
"text": "Simulating Sync With the Exchange"
|
||||
}
|
||||
]
|
||||
}
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
{
|
||||
"topic": "TS LF Trading Bot Warnings",
|
||||
"pageNumber": "12",
|
||||
"type": "TS LF Trading Bot Warning - Order Could Not Be Opened",
|
||||
"definition": {
|
||||
"text": "We tried to open this order at the Exchange but it was not possible.",
|
||||
"updated": 1611833724444
|
||||
},
|
||||
"paragraphs": [
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "This is normal behaviour you should not worry about. This warning is created in order to let you know that this happened and help you track the details of each trade.",
|
||||
"updated": 1611834495196
|
||||
},
|
||||
{
|
||||
"style": "Warning",
|
||||
"text": "Order Coult Not Be Opened"
|
||||
},
|
||||
{
|
||||
"style": "Title",
|
||||
"text": "Context Info"
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "The following are the values of variables at the time this warning was created. They might be useful for you to understand what exactly happened."
|
||||
},
|
||||
{
|
||||
"style": "Placeholder",
|
||||
"text": "contextInfo"
|
||||
},
|
||||
{
|
||||
"style": "Title",
|
||||
"text": "Learn More"
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "To learn more about this topic, please read the following page:"
|
||||
},
|
||||
{
|
||||
"style": "List",
|
||||
"text": "Simulating Sync With the Exchange"
|
||||
}
|
||||
]
|
||||
}
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
{
|
||||
"topic": "TS LF Trading Bot Warnings",
|
||||
"pageNumber": "13",
|
||||
"type": "TS LF Trading Bot Warning - Order Size Shrinked",
|
||||
"definition": {
|
||||
"text": "The Order Size wahs shrinked so that the Size Placed once the order is filled, does not produce that we go over the Target Size defined for the whole stage.",
|
||||
"updated": 1611833827822
|
||||
},
|
||||
"paragraphs": [
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "This is normal behaviour you should not worry about. This warning is created in order to let you know that this happened and help you track the details of each trade.",
|
||||
"updated": 1611834512006
|
||||
},
|
||||
{
|
||||
"style": "Warning",
|
||||
"text": "Order Size Shrinked"
|
||||
},
|
||||
{
|
||||
"style": "Title",
|
||||
"text": "Context Info"
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "The following are the values of variables at the time this warning was created. They might be useful for you to understand what exactly happened."
|
||||
},
|
||||
{
|
||||
"style": "Placeholder",
|
||||
"text": "contextInfo"
|
||||
},
|
||||
{
|
||||
"style": "Title",
|
||||
"text": "Learn More"
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "To learn more about this topic, please read the following page:"
|
||||
},
|
||||
{
|
||||
"style": "List",
|
||||
"text": "Simulating Sync With the Exchange"
|
||||
}
|
||||
]
|
||||
}
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
{
|
||||
"topic": "TS LF Trading Bot Warnings",
|
||||
"pageNumber": "14",
|
||||
"type": "TS LF Trading Bot Warning - Possible Negative Balance",
|
||||
"definition": {
|
||||
"text": "The Order Size was recalculated because at it's current value, would leave us with a negative Balance. We set the Order Size equal to the remaining Balance to avoid this situation.",
|
||||
"updated": 1611834061538
|
||||
},
|
||||
"paragraphs": [
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "This is normal behaviour you should not worry about. This warning is created in order to let you know that this happened and help you track the details of each trade.",
|
||||
"updated": 1611834528166
|
||||
},
|
||||
{
|
||||
"style": "Warning",
|
||||
"text": "Possible Negative Balance"
|
||||
},
|
||||
{
|
||||
"style": "Title",
|
||||
"text": "Context Info"
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "The following are the values of variables at the time this warning was created. They might be useful for you to understand what exactly happened."
|
||||
},
|
||||
{
|
||||
"style": "Placeholder",
|
||||
"text": "contextInfo"
|
||||
},
|
||||
{
|
||||
"style": "Title",
|
||||
"text": "Learn More"
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "To learn more about this topic, please read the following page:"
|
||||
},
|
||||
{
|
||||
"style": "List",
|
||||
"text": "Simulating Sync With the Exchange"
|
||||
}
|
||||
]
|
||||
}
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
{
|
||||
"topic": "TS LF Trading Bot Warnings",
|
||||
"pageNumber": "15",
|
||||
"type": "TS LF Trading Bot Warning - Order Status Not Sync With Exchange",
|
||||
"definition": {
|
||||
"text": "For some reason, we could not verify the status of this order at the exchange. This means that the accounting or other actions that needed to be taken will be suspended until the communication with the exchange is restablished.",
|
||||
"updated": 1611834233298
|
||||
},
|
||||
"paragraphs": [
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "This is normal behaviour you should not worry about. This warning is created in order to let you know that this happened and help you track the details of each trade.",
|
||||
"updated": 1611834545651
|
||||
},
|
||||
{
|
||||
"style": "Warning",
|
||||
"text": "Order Status Not Sync With Exchange"
|
||||
},
|
||||
{
|
||||
"style": "Title",
|
||||
"text": "Context Info"
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "The following are the values of variables at the time this warning was created. They might be useful for you to understand what exactly happened."
|
||||
},
|
||||
{
|
||||
"style": "Placeholder",
|
||||
"text": "contextInfo"
|
||||
},
|
||||
{
|
||||
"style": "Title",
|
||||
"text": "Learn More"
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "To learn more about this topic, please read the following page:"
|
||||
},
|
||||
{
|
||||
"style": "List",
|
||||
"text": "Simulating Sync With the Exchange"
|
||||
}
|
||||
]
|
||||
}
|
||||
+132
-12
@@ -158,13 +158,23 @@ exports.newSuperalgosBotModulesTradingOrders = function (processIndex) {
|
||||
if (allGood !== true) {
|
||||
/*
|
||||
For some reason we could not check the order at the exchange, so we will not even check if we
|
||||
need to cancel it, since we could end up with inconsisten information at the accounting level.
|
||||
need to cancel it, since we could end up with inconsistent information at the accounting level.
|
||||
*/
|
||||
if (tradingSystemOrder.cancelOrderEvent !== undefined) {
|
||||
|
||||
const message = 'Skipping Cancel Order Event'
|
||||
let docs = {
|
||||
project: 'Superalgos',
|
||||
category: 'Topic',
|
||||
type: 'TS LF Trading Bot Warning - ' + message,
|
||||
placeholder: {}
|
||||
}
|
||||
|
||||
tradingSystem.warnings.push(
|
||||
[
|
||||
tradingSystemOrder.cancelOrderEvent.id,
|
||||
'Skipping Cancel Event Checking because cheking the order at the exchange failed.'
|
||||
message,
|
||||
docs
|
||||
]
|
||||
)
|
||||
}
|
||||
@@ -234,7 +244,7 @@ exports.newSuperalgosBotModulesTradingOrders = function (processIndex) {
|
||||
if (tradingEngineOrder.rate === undefined) { badDefinitionUnhandledException(undefined, 'Rate Node Missing', tradingEngineOrder) }
|
||||
if (tradingEngineOrder.status === undefined) { badDefinitionUnhandledException(undefined, 'Status Node Missing', tradingEngineOrder) }
|
||||
if (tradingEngineOrder.algorithmName === undefined) { badDefinitionUnhandledException(undefined, 'Algorithm Name Node Missing', tradingEngineOrder) }
|
||||
|
||||
|
||||
if (tradingEngineOrder.orderCounters === undefined) { badDefinitionUnhandledException(undefined, 'Order Counters Node Missing', tradingEngineOrder) }
|
||||
if (tradingEngineOrder.orderCounters.periods === undefined) { badDefinitionUnhandledException(undefined, 'Periods Node Missing', tradingEngineOrder.orderCounters) }
|
||||
|
||||
@@ -267,20 +277,40 @@ exports.newSuperalgosBotModulesTradingOrders = function (processIndex) {
|
||||
|
||||
/* Check Size: We are not going to create Orders which size is equal or less to zero. */
|
||||
if (tradingEngineOrder.orderBaseAsset.size.value <= 0) {
|
||||
|
||||
const message = 'Order Size Value Zero Or Negative'
|
||||
let docs = {
|
||||
project: 'Superalgos',
|
||||
category: 'Topic',
|
||||
type: 'TS LF Trading Bot Warning - ' + message,
|
||||
placeholder: {}
|
||||
}
|
||||
|
||||
tradingSystem.warnings.push(
|
||||
[
|
||||
[tradingEngineOrder.orderBaseAsset.size.id, tradingSystemOrder.id],
|
||||
'Could not open this order because its size is zero.'
|
||||
message,
|
||||
docs
|
||||
]
|
||||
)
|
||||
return
|
||||
}
|
||||
|
||||
if (tradingEngineOrder.orderQuotedAsset.size.value <= 0) {
|
||||
|
||||
const message = 'Order Size Value Zero Or Negative'
|
||||
let docs = {
|
||||
project: 'Superalgos',
|
||||
category: 'Topic',
|
||||
type: 'TS LF Trading Bot Warning - ' + message,
|
||||
placeholder: {}
|
||||
}
|
||||
|
||||
tradingSystem.warnings.push(
|
||||
[
|
||||
[tradingEngineOrder.orderQuotedAsset.size.id, tradingSystemOrder.id],
|
||||
'Could not open this order because its size is zero.'
|
||||
message,
|
||||
docs
|
||||
]
|
||||
)
|
||||
return
|
||||
@@ -289,10 +319,20 @@ exports.newSuperalgosBotModulesTradingOrders = function (processIndex) {
|
||||
/* Place Order at the Exchange, if needed. */
|
||||
let result = await createOrderAtExchange(tradingSystemOrder, tradingEngineOrder)
|
||||
if (result !== true) {
|
||||
|
||||
const message = 'Order Could Not Be Opened'
|
||||
let docs = {
|
||||
project: 'Superalgos',
|
||||
category: 'Topic',
|
||||
type: 'TS LF Trading Bot Warning - ' + message,
|
||||
placeholder: {}
|
||||
}
|
||||
|
||||
tradingSystem.warnings.push(
|
||||
[
|
||||
[tradingSystemOrder.id, tradingEngineOrder],
|
||||
'Could not open this order because something failed placing the order at the Exchange.'
|
||||
message,
|
||||
docs
|
||||
]
|
||||
)
|
||||
return
|
||||
@@ -397,10 +437,26 @@ exports.newSuperalgosBotModulesTradingOrders = function (processIndex) {
|
||||
|
||||
tradingEngineOrder.orderBaseAsset.size.value = TS.projects.superalgos.utilities.miscellaneousFunctions.truncateToThisPrecision(tradingEngineOrder.orderBaseAsset.size.value, 10)
|
||||
|
||||
const message = 'Order Size Shrinked'
|
||||
let docs = {
|
||||
project: 'Superalgos',
|
||||
category: 'Topic',
|
||||
type: 'TS LF Trading Bot Warning - ' + message,
|
||||
placeholder: {}
|
||||
}
|
||||
contextInfo = {
|
||||
previousOrderSize: previousValue,
|
||||
recalculatedOrderSize: tradingEngineOrder.orderBaseAsset.size.value,
|
||||
sizePlaced: tradingEngineStage.stageBaseAsset.sizePlaced.value,
|
||||
targetSize: tradingEngineStage.stageBaseAsset.targetSize.value
|
||||
}
|
||||
TS.projects.superalgos.utilities.docsFunctions.buildPlaceholder(docs, undefined, undefined, undefined, undefined, undefined, contextInfo)
|
||||
|
||||
tradingSystem.warnings.push(
|
||||
[
|
||||
[tradingEngineStage.stageBaseAsset.targetSize.id, tradingEngineOrder.orderBaseAsset.size.id, tradingEngineStage.stageBaseAsset.sizePlaced.id],
|
||||
'Order size (' + previousValue + ') shrinked (' + tradingEngineOrder.orderBaseAsset.size.value + ') so that the Size Placed (' + tradingEngineStage.stageBaseAsset.sizePlaced.value + ') does not exceed the Target Size (' + tradingEngineStage.stageBaseAsset.targetSize.value + ') for the stage.'
|
||||
message,
|
||||
docs
|
||||
]
|
||||
)
|
||||
}
|
||||
@@ -427,10 +483,26 @@ exports.newSuperalgosBotModulesTradingOrders = function (processIndex) {
|
||||
|
||||
tradingEngineOrder.orderQuotedAsset.size.value = TS.projects.superalgos.utilities.miscellaneousFunctions.truncateToThisPrecision(tradingEngineOrder.orderQuotedAsset.size.value, 10)
|
||||
|
||||
const message = 'Order Size Shrinked'
|
||||
let docs = {
|
||||
project: 'Superalgos',
|
||||
category: 'Topic',
|
||||
type: 'TS LF Trading Bot Warning - ' + message,
|
||||
placeholder: {}
|
||||
}
|
||||
contextInfo = {
|
||||
previousOrderSize: previousValue,
|
||||
recalculatedOrderSize: tradingEngineOrder.orderQuotedAsset.size.value,
|
||||
sizePlaced: tradingEngineStage.stageQuotedAsset.sizePlaced.value,
|
||||
targetSize: tradingEngineStage.stageQuotedAsset.targetSize.value
|
||||
}
|
||||
TS.projects.superalgos.utilities.docsFunctions.buildPlaceholder(docs, undefined, undefined, undefined, undefined, undefined, contextInfo)
|
||||
|
||||
tradingSystem.warnings.push(
|
||||
[
|
||||
[tradingEngineStage.stageQuotedAsset.targetSize.id, tradingEngineOrder.orderQuotedAsset.size.id, tradingEngineStage.stageQuotedAsset.sizePlaced.id],
|
||||
'Order size (' + previousValue + ') shrinked (' + tradingEngineOrder.orderQuotedAsset.size.value + ') so that the Size Placed (' + tradingEngineStage.stageQuotedAsset.sizePlaced.value + ') does not exceed the Target Size (' + tradingEngineStage.stageQuotedAsset.targetSize.value + ') for the stage.'
|
||||
message,
|
||||
docs
|
||||
]
|
||||
)
|
||||
}
|
||||
@@ -450,10 +522,24 @@ exports.newSuperalgosBotModulesTradingOrders = function (processIndex) {
|
||||
if (
|
||||
tradingEngine.current.episode.episodeQuotedAsset.balance.value - tradingEngineOrder.orderQuotedAsset.size.value < 0
|
||||
) {
|
||||
const message = 'Possible Negative Balance'
|
||||
let docs = {
|
||||
project: 'Superalgos',
|
||||
category: 'Topic',
|
||||
type: 'TS LF Trading Bot Warning - ' + message,
|
||||
placeholder: {}
|
||||
}
|
||||
contextInfo = {
|
||||
orderQuotedAssetSize: tradingEngineOrder.orderQuotedAsset.size.value,
|
||||
episodeQuotedAssetBalance: tradingEngine.current.episode.episodeQuotedAsset.balance.value
|
||||
}
|
||||
TS.projects.superalgos.utilities.docsFunctions.buildPlaceholder(docs, undefined, undefined, undefined, undefined, undefined, contextInfo)
|
||||
|
||||
tradingSystem.warnings.push(
|
||||
[
|
||||
[tradingEngine.current.episode.episodeQuotedAsset.balance.id, tradingEngineOrder.orderQuotedAsset.size.id],
|
||||
'Order Size Quoted Asset (' + tradingEngineOrder.orderQuotedAsset.size.value + ') changed to Balance Quoted Asset (' + tradingEngine.current.episode.episodeQuotedAsset.balance.value + ') so that the Balance does not drop below zero.'
|
||||
message,
|
||||
docs
|
||||
]
|
||||
)
|
||||
|
||||
@@ -466,10 +552,24 @@ exports.newSuperalgosBotModulesTradingOrders = function (processIndex) {
|
||||
if (
|
||||
tradingEngine.current.episode.episodeBaseAsset.balance.value - tradingEngineOrder.orderBaseAsset.size.value < 0
|
||||
) {
|
||||
const message = 'Possible Negative Balance'
|
||||
let docs = {
|
||||
project: 'Superalgos',
|
||||
category: 'Topic',
|
||||
type: 'TS LF Trading Bot Warning - ' + message,
|
||||
placeholder: {}
|
||||
}
|
||||
contextInfo = {
|
||||
orderBaseAssetSize: tradingEngineOrder.orderBaseAsset.size.value,
|
||||
episodeBaseAssetBalance: tradingEngine.current.episode.episodeBaseAsset.balance.value
|
||||
}
|
||||
TS.projects.superalgos.utilities.docsFunctions.buildPlaceholder(docs, undefined, undefined, undefined, undefined, undefined, contextInfo)
|
||||
|
||||
tradingSystem.warnings.push(
|
||||
[
|
||||
[tradingEngine.current.episode.episodeBaseAsset.balance.id, tradingEngineOrder.orderBaseAsset.size.id],
|
||||
'Order Size Base Asset (' + tradingEngineOrder.orderBaseAsset.size.value + ') changed to Balance Base Asset (' + tradingEngine.current.episode.episodeBaseAsset.balance.value + ') so that the Balance does not drop below zero.'
|
||||
message,
|
||||
docs
|
||||
]
|
||||
)
|
||||
|
||||
@@ -533,10 +633,20 @@ exports.newSuperalgosBotModulesTradingOrders = function (processIndex) {
|
||||
let order = await exchangeAPIModuleObject.getOrder(tradingSystemOrder, tradingEngineOrder)
|
||||
|
||||
if (order === undefined) {
|
||||
|
||||
const message = 'Order Status Not Sync With Exchange'
|
||||
let docs = {
|
||||
project: 'Superalgos',
|
||||
category: 'Topic',
|
||||
type: 'TS LF Trading Bot Warning - ' + message,
|
||||
placeholder: {}
|
||||
}
|
||||
|
||||
tradingSystem.warnings.push(
|
||||
[
|
||||
[tradingSystemOrder.id, tradingEngineOrder.id],
|
||||
'Could not verify the status of this order at the exchange.'
|
||||
message,
|
||||
docs
|
||||
]
|
||||
)
|
||||
return false
|
||||
@@ -910,10 +1020,20 @@ exports.newSuperalgosBotModulesTradingOrders = function (processIndex) {
|
||||
let order = await exchangeAPIModuleObject.getOrder(tradingSystemOrder, tradingEngineOrder)
|
||||
|
||||
if (order === undefined) {
|
||||
|
||||
const message = 'Order Status Not Sync With Exchange'
|
||||
let docs = {
|
||||
project: 'Superalgos',
|
||||
category: 'Topic',
|
||||
type: 'TS LF Trading Bot Warning - ' + message,
|
||||
placeholder: {}
|
||||
}
|
||||
|
||||
tradingSystem.warnings.push(
|
||||
[
|
||||
[tradingSystemOrder.id, tradingEngineOrder.id],
|
||||
'Could not verify the status of this order at the exchange, and syncronize the accounting.'
|
||||
message,
|
||||
docs
|
||||
]
|
||||
)
|
||||
return false
|
||||
|
||||
Reference in new issue
Block a user