54 files changed
+1103
-48
No files matched your search
Binary file not shown.
|
After Width: | Height: | Size: 226 KiB |
@@ -83,6 +83,11 @@
|
||||
"text": "XIV->Superalgos->Topic->Productivity Tools->This chapter discusses a collection of tools that help optimize productivity.",
|
||||
"updated": 1611503697142
|
||||
},
|
||||
{
|
||||
"style": "Chapter",
|
||||
"text": "XV->Superalgos->Topic->Troubleshooting->Superalgos is a vast system and you will run into confusing situations while learning it. You must acquire the knowledge on how to analyze the issues that you may encounter. There usually is a good explanation for what is going on. This chapter helps you in that process.",
|
||||
"updated": 1611649840313
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": ""
|
||||
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"topic": "Crypto Ecosystem",
|
||||
"pageNumber": "2",
|
||||
"type": "How to Install a New Market",
|
||||
"definition": {
|
||||
"text": "To install a new market, select Install Market on the menu of the market you wish to install. If the market is not set up, then you must set it up first.",
|
||||
"updated": 1611651225966
|
||||
},
|
||||
"paragraphs": [
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "For the details, please follow the Install New Market tutorial on the Getting Started Workspace.",
|
||||
"updated": 1611651240216
|
||||
}
|
||||
]
|
||||
}
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"topic": "Crypto Ecosystem",
|
||||
"pageNumber": "3",
|
||||
"type": "How to Uninstall an Existing Market",
|
||||
"definition": {
|
||||
"text": "To uninstall an existing market, select Uninstall Market on the menu of the market you wish to uninstall.",
|
||||
"updated": 1611650874487
|
||||
},
|
||||
"paragraphs": [
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "1. Expand the exchange markets node of your preferred crypto exchange in the crypto ecosystem hierarchy.",
|
||||
"updated": 1611650884837
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "2. Select Uninstall Market on the menu of the market you wish to uninstall."
|
||||
},
|
||||
{
|
||||
"style": "Note",
|
||||
"text": "The function deletes all the infrastructure associated with the market that may have been created using the Install Market function.",
|
||||
"updated": 1611650909369
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
{
|
||||
"topic": "Crypto Ecosystem",
|
||||
"pageNumber": "4",
|
||||
"type": "How to Set Up a New Exchange",
|
||||
"definition": {
|
||||
"text": "To set up a new exchange, find it in the Untested crypto exchanges node and bring it to a less crowded crypto exchanges node to make room for the new setup. Then add the assets and the markets you wish to work with, and finally, install the markets.",
|
||||
"updated": 1611651356918
|
||||
},
|
||||
"paragraphs": [
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "Not all tested exchanges are set up in the default workspace. If you wish to use an exchange that is not set up in the workspace, you may set it up yourself following the instructions below.",
|
||||
"updated": 1611651386757
|
||||
},
|
||||
{
|
||||
"style": "Title",
|
||||
"text": "Start Here",
|
||||
"updated": 1611651407421
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "1. Expand the Untested crypto exchanges node in the crypto ecosystem hierarchy."
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "2. Locate the desired exchange, detach it from its parent, and attach it to the Testing Queue crypto exchanges node. You may choose to attach your select exchange node to any other crypto exchanges node, or even add a new one. This is merely for organizational purposes and to keep the workspace tidy."
|
||||
},
|
||||
{
|
||||
"style": "Note",
|
||||
"text": "If the exchange you are looking for is not available there, it means it can not be setup in Superalgos at this point, likely for either or both of the following reasons: 1. The exchange does not provide one-minute candles; 2. The exchange does not provide a list of markets. Not all exchanges supported by the CCXT library comply in full with the standards proposed.",
|
||||
"updated": 1611651421882
|
||||
},
|
||||
{
|
||||
"style": "Success",
|
||||
"text": "There are over 60 exchanges complying with the CCXT library API standard, an open-source effort to standardize communications with crypto exchanges, to the level required by Superalgos. If your exchange is not among those 60 plus exchanges, you may want to consider trading somewhere else. This is why: automating trading at your exchange requires building and maintaining a custom connector to speak with their API. It is unlikely that you will find an open-source project—or even a commercial solution—willing to do that, unless your exchange is in the top-10 list of exchanges in the world by volume traded.",
|
||||
"updated": 1611651429157
|
||||
},
|
||||
{
|
||||
"style": "Success",
|
||||
"text": "Alternative approach 1: Convince your exchange to comply with the standard.",
|
||||
"updated": 1611651439395
|
||||
},
|
||||
{
|
||||
"style": "Success",
|
||||
"text": "Alternative approach 2: Develop your own connector. We’ll be happy to guide you and help you along the way!",
|
||||
"updated": 1611651447177
|
||||
}
|
||||
]
|
||||
}
|
||||
+80
@@ -0,0 +1,80 @@
|
||||
{
|
||||
"topic": "Crypto Ecosystem",
|
||||
"pageNumber": "6",
|
||||
"type": "How to Test New Exchanges",
|
||||
"definition": {
|
||||
"text": "While only a few exchanges have been tested by the team, you may wish to test other exchanges you may be interested in. This is how.",
|
||||
"updated": 1611651607248
|
||||
},
|
||||
"paragraphs": [
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "Testing new exchanges is a technical endeavor that requires a good understanding of how Superalgos works with data. These are a few logical steps you should take to test the OHLCV and trading capabilities…",
|
||||
"updated": 1611651621128
|
||||
},
|
||||
{
|
||||
"style": "Title",
|
||||
"text": "Start Here"
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "1. Set up the exchange you wish to test."
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "2. Install the market you wish to test."
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "3. Run the Sensor Bot task and monitor the console for errors. If everything seems to be working fine, then proceed."
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "4. Run the indicator bot tasks required to run a trading session with the trading system of your choice."
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "5. Run a backtesting session."
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "6. Run a paper trading session."
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "7. Run a live trading session."
|
||||
},
|
||||
{
|
||||
"style": "Title",
|
||||
"text": "What to Do If You Encounter Problems"
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "You may encounter all sorts of issues while testing a new exchange, at any one of the steps listed above. If you are really interested in working with the exchange and are willing to put some time and effort into investigating the issues, we will be happy to work with you and develop fixes that may help overcome any problems you may run into. Superalgos is prepared to send arbitrary parameters to API calls, so solving the issue may be quite easy. All we need from you is to point us in the right direction by contributing the initial research."
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "These are a few things we’ve learnt while testing exchanges, that may help you in the process:"
|
||||
},
|
||||
{
|
||||
"style": "List",
|
||||
"text": "Study the exchange’s API documentation."
|
||||
},
|
||||
{
|
||||
"style": "List",
|
||||
"text": "Be aware that exchanges may publish more than one API, or an API with mutliple versions."
|
||||
},
|
||||
{
|
||||
"style": "List",
|
||||
"text": "There may be more than one way to make a certain request and Superalgos may be making it in the non-optimal way for that particular exchange. For example, we may be querying the wrong API."
|
||||
},
|
||||
{
|
||||
"style": "List",
|
||||
"text": "Some exchanges may behave differently when the user is authenticated with API keys, even when retrieving data. For example, Binance allows downloading up to one-day worth of historical trades information when the user is not authenticated, but allows downloading trades spanning the whole market when authenticated."
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"topic": "Error Causes",
|
||||
"pageNumber": "1",
|
||||
"type": "Reference Missing",
|
||||
"definition": {
|
||||
"text": "You will get an error of this type every time a Node that is expected to reference some other node and no reference was found. You can usually avoid this type of errors by setting up the expected reference.",
|
||||
"updated": 1611652038378
|
||||
},
|
||||
"paragraphs": [
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "Left click and Edit to enter edit mode and change this text. ENTER to write new paragraphs. ESC to exit edit mode. Then you can use doscs.save to save your changes and app.contribute to send it to the main repository."
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"topic": "Error Causes",
|
||||
"pageNumber": "2",
|
||||
"type": "Node Missing",
|
||||
"definition": {
|
||||
"text": "You will get this type of errors every time a Node is expected as a child of another Node but it is not found. To avoid this type of errors, add the missing Node as a child of the Node where this type of error pops up.",
|
||||
"updated": 1611652119353
|
||||
},
|
||||
"paragraphs": [
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "Left click and Edit to enter edit mode and change this text. ENTER to write new paragraphs. ESC to exit edit mode. Then you can use doscs.save to save your changes and app.contribute to send it to the main repository."
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"topic": "Error Causes",
|
||||
"pageNumber": "3",
|
||||
"type": "Value Not A Number",
|
||||
"definition": {
|
||||
"text": "At runtime some nodes might aquire a value, and when it is expected that the value is a number, this type of error will pop up. To avoid this to happen make yourself sure that at nodes that should have only numeric values, that they don't get by any means a non numeric one.",
|
||||
"updated": 1611652261727
|
||||
},
|
||||
"paragraphs": [
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "Left click and Edit to enter edit mode and change this text. ENTER to write new paragraphs. ESC to exit edit mode. Then you can use doscs.save to save your changes and app.contribute to send it to the main repository."
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"topic": "Error Causes",
|
||||
"pageNumber": "4",
|
||||
"type": "Value Undefined",
|
||||
"definition": {
|
||||
"text": "Some nodes might aquire a value at runtime. This type of error will pop up when such a node is expected to have some value but it has none. Undefined means no value at all of any type.",
|
||||
"updated": 1611652326745
|
||||
},
|
||||
"paragraphs": [
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "Left click and Edit to enter edit mode and change this text. ENTER to write new paragraphs. ESC to exit edit mode. Then you can use doscs.save to save your changes and app.contribute to send it to the main repository."
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"topic": "Error Causes",
|
||||
"pageNumber": "5",
|
||||
"type": "Value Zero",
|
||||
"definition": {
|
||||
"text": "At runtime some nodes might aquire a value, and when it is expected not to be zero this type of error will pop up. To avoid this type of error, make yourself sure that the Node where the error poped up never get a zero value.",
|
||||
"updated": 1611652416098
|
||||
},
|
||||
"paragraphs": [
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "Left click and Edit to enter edit mode and change this text. ENTER to write new paragraphs. ESC to exit edit mode. Then you can use doscs.save to save your changes and app.contribute to send it to the main repository."
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"topic": "Error Causes",
|
||||
"pageNumber": "6",
|
||||
"type": "Value Zero Or Negative",
|
||||
"definition": {
|
||||
"text": "At runtime some nodes might aquire a value, and when it is expected not to be zero or negative this type of error will pop up. To avoid this type of error, make yourself sure that the Node where the error poped up never get a zero or negative value.",
|
||||
"updated": 1611652451957
|
||||
},
|
||||
"paragraphs": [
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "Left click and Edit to enter edit mode and change this text. ENTER to write new paragraphs. ESC to exit edit mode. Then you can use doscs.save to save your changes and app.contribute to send it to the main repository."
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"topic": "Error Causes",
|
||||
"pageNumber": "7",
|
||||
"type": "Property Missing",
|
||||
"definition": {
|
||||
"text": "This type of error means that a property at the config of a node is expected but was not found there. To avoid this type of errors, check the node's config and add the missing property.",
|
||||
"updated": 1611652513029
|
||||
},
|
||||
"paragraphs": [
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "Left click and Edit to enter edit mode and change this text. ENTER to write new paragraphs. ESC to exit edit mode. Then you can use doscs.save to save your changes and app.contribute to send it to the main repository."
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"topic": "Error Causes",
|
||||
"pageNumber": "8",
|
||||
"type": "Property Not A Number",
|
||||
"definition": {
|
||||
"text": "This type of error means that a property at the config of a node is expected to be a number but the value there it is not. To avoid this type of errors, check the node's config and make yourself sure that the property mentioned is indeed a number.",
|
||||
"updated": 1611652575431
|
||||
},
|
||||
"paragraphs": [
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "Left click and Edit to enter edit mode and change this text. ENTER to write new paragraphs. ESC to exit edit mode. Then you can use doscs.save to save your changes and app.contribute to send it to the main repository."
|
||||
}
|
||||
]
|
||||
}
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"topic": "Network",
|
||||
"pageNumber": "14",
|
||||
"type": "How to Safely Close Superalgos",
|
||||
"definition": {
|
||||
"text": "The correct way to close Superalgos is to stop all tasks in the data-mining and trading operations, wait a few seconds until the tasks stop, and only then close the browser. Before closing the console, you must wait around a minute until there is no further activity.",
|
||||
"updated": 1611650579593
|
||||
},
|
||||
"paragraphs": [
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "The backend application runs independently from the frontend browser-based application. You may close the browser at any point without affecting your data-mining operation or the bots you may be running in your testing or prodution environments. Once you restart the browser and navigate to the correct URL, the frontend app reconnects with the backend and you regain control over the whole operation.",
|
||||
"updated": 1611650588719
|
||||
},
|
||||
{
|
||||
"style": "Important",
|
||||
"text": "If you wish to completely close Superalgos and stop all operations, there is a safe way to do this while preventing the corruption of files that may be processing at any point.",
|
||||
"updated": 1611650597554
|
||||
},
|
||||
{
|
||||
"style": "Title",
|
||||
"text": "Start Here"
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "1. Close all data-mining tasks. Select Stop All Exchange Data Tasks on the data mining node menu."
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "2. Close all tasks in the testing environment and the production environment. Select Stop All Task Managers in the testing and production environment nodes menus."
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "3. Wait a few seconds until all tasks are stopped and close the browser."
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "4. Wait for about one minute until all activity stops in the console, then close it."
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"topic": "Troubleshooting",
|
||||
"pageNumber": "14",
|
||||
"type": "Debugging a Task",
|
||||
"definition": {
|
||||
"text": "Run the TaskManager project in your preferred IDE and use the Debug button on the task's menu.",
|
||||
"updated": 1611648881024
|
||||
},
|
||||
"paragraphs": [
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "You may debug any task, either a data mining task or a trading task by following these steps.",
|
||||
"updated": 1611648894746
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "1. Run the Superalgos Client In the usual manner.",
|
||||
"updated": 1611648991679
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "2. Open the TaskServer project in your preferred IDE, place a breakpoint in the part of the code you wish to debug, and run the TaskServer."
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "3. Click the Debug button on the menu of the task you wish to debug. The request will be routed to the TaskServer running in your IDE."
|
||||
},
|
||||
{
|
||||
"style": "Png",
|
||||
"text": "PNGs/Superalgos/Docs/troubleshooting/debugging-tasks.png",
|
||||
"updated": 1611649086110
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "4. Run the trading session in case it is a trading task."
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "After a few seconds, execution should pause in the line where you put the breakpoint. Bear in mind the system runs slower in debug mode, thus, it may take a little while for the session to start processing, after loading all dependencies."
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
{
|
||||
"topic": "Troubleshooting",
|
||||
"pageNumber": "15",
|
||||
"type": "Debugging a New Indicator",
|
||||
"definition": {
|
||||
"text": "A case study for developers on how to debug an indicator-in-the-making. These are a few notes taken during a real issue when building the RSI indicator.",
|
||||
"updated": 1611649401081
|
||||
},
|
||||
"paragraphs": [
|
||||
{
|
||||
"style": "Title",
|
||||
"text": "My Indicator Is Not Running!",
|
||||
"updated": 1611649414736
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "This is the logical checklist in such scenario:"
|
||||
},
|
||||
{
|
||||
"style": "List",
|
||||
"text": "Make sure all dependencies are running."
|
||||
},
|
||||
{
|
||||
"style": "List",
|
||||
"text": "Determine which process is not running (Multi-Period-Daily or Multi-Period-Market)."
|
||||
},
|
||||
{
|
||||
"style": "List",
|
||||
"text": "Check if the corresponding execution started event is referencing the proper process. Make sure the referenced process is running without error, at 100%."
|
||||
},
|
||||
{
|
||||
"style": "List",
|
||||
"text": "Check if data dependency references are in place. Make sure these dependencies are running without error, at 100%."
|
||||
},
|
||||
{
|
||||
"style": "List",
|
||||
"text": "Stop all bots and delete the Log-Files folder so that you may easily identify current logs."
|
||||
},
|
||||
{
|
||||
"style": "List",
|
||||
"text": "Run your indicator’s dependencies."
|
||||
},
|
||||
{
|
||||
"style": "List",
|
||||
"text": "Make sure they are running properly, without errors. Check the logs if in doubt."
|
||||
},
|
||||
{
|
||||
"style": "List",
|
||||
"text": "Run your indicator. Check your indicator’s log files."
|
||||
},
|
||||
{
|
||||
"style": "Title",
|
||||
"text": "My Indicator Runs With Errors"
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "You may debug an indicator by Debugging a Task, that is, the Data Task that controls the indicator.",
|
||||
"updated": 1611649534218
|
||||
}
|
||||
]
|
||||
}
|
||||
+3
-3
@@ -8,9 +8,9 @@
|
||||
},
|
||||
"paragraphs": [
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "This error happens when the conditions to switch phases are met but the LF Trading Bot cannot find a reference to the Phase where it should switch to.",
|
||||
"updated": 1611581092289
|
||||
"style": "Error",
|
||||
"text": "Reference to Phase Node Missing",
|
||||
"updated": 1611652631671
|
||||
},
|
||||
{
|
||||
"style": "Success",
|
||||
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"topic": "TS LF Trading Bot Errors",
|
||||
"pageNumber": "15",
|
||||
"type": "TS LF Trading Bot Error - Order Reference Missing",
|
||||
"definition": {
|
||||
"text": "Each order at the Trading System is expected to have a reference to an order at the Trading Engine Data Structure. This references tells the system where to track at runtime the values of the order properties while the bot is running.",
|
||||
"updated": 1611649597701
|
||||
},
|
||||
"paragraphs": [
|
||||
{
|
||||
"style": "Error",
|
||||
"text": "Order Reference Missing",
|
||||
"updated": 1611649632142
|
||||
},
|
||||
{
|
||||
"style": "Success",
|
||||
"text": "Set up the reference to an order of the Trading Engine and try again."
|
||||
}
|
||||
]
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"topic": "TS LF Trading Bot Errors",
|
||||
"pageNumber": "16",
|
||||
"type": "TS LF Trading Bot Error - Status Node Missing",
|
||||
"definition": {
|
||||
"text": "A Status Node was expected but not found at the node where the error poped up.",
|
||||
"updated": 1611649715787
|
||||
},
|
||||
"paragraphs": [
|
||||
{
|
||||
"style": "Error",
|
||||
"text": "Status Node Missing",
|
||||
"updated": 1611650236471
|
||||
},
|
||||
{
|
||||
"style": "Success",
|
||||
"text": "Add the missing node and try again."
|
||||
}
|
||||
]
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"topic": "TS LF Trading Bot Errors",
|
||||
"pageNumber": "17",
|
||||
"type": "TS LF Trading Bot Error - Percentage Of Algorithm Size Property Missing",
|
||||
"definition": {
|
||||
"text": "Write a summary for this topic page."
|
||||
},
|
||||
"paragraphs": [
|
||||
{
|
||||
"style": "Error",
|
||||
"text": "Percentage Of Algorithm Size Property Missing",
|
||||
"updated": 1611651040820
|
||||
},
|
||||
{
|
||||
"style": "Success",
|
||||
"text": "Add the missing property and try again."
|
||||
}
|
||||
]
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"topic": "TS LF Trading Bot Errors",
|
||||
"pageNumber": "18",
|
||||
"type": "TS LF Trading Bot Error - Serial Number Node Missing",
|
||||
"definition": {
|
||||
"text": "A Serial Number Node was expected but not found at the node where the error poped up.",
|
||||
"updated": 1611649736116
|
||||
},
|
||||
"paragraphs": [
|
||||
{
|
||||
"style": "Error",
|
||||
"text": "Serial Number Node Missing",
|
||||
"updated": 1611650268159
|
||||
},
|
||||
{
|
||||
"style": "Success",
|
||||
"text": "Add the missing node and try again."
|
||||
}
|
||||
]
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"topic": "TS LF Trading Bot Errors",
|
||||
"pageNumber": "19",
|
||||
"type": "TS LF Trading Bot Error - Identifier Node Missing",
|
||||
"definition": {
|
||||
"text": "A Identifier Node was expected but not found at the node where the error poped up.",
|
||||
"updated": 1611649754630
|
||||
},
|
||||
"paragraphs": [
|
||||
{
|
||||
"style": "Error",
|
||||
"text": "Identifier Node Missing",
|
||||
"updated": 1611650286710
|
||||
},
|
||||
{
|
||||
"style": "Success",
|
||||
"text": "Add the missing node and try again."
|
||||
}
|
||||
]
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"topic": "TS LF Trading Bot Errors",
|
||||
"pageNumber": "20",
|
||||
"type": "TS LF Trading Bot Error - Exchange Id Node Missing",
|
||||
"definition": {
|
||||
"text": "A Exchange Id Node was expected but not found at the node where the error poped up.",
|
||||
"updated": 1611649774326
|
||||
},
|
||||
"paragraphs": [
|
||||
{
|
||||
"style": "Error",
|
||||
"text": "Exchange Id Node Missing",
|
||||
"updated": 1611650307237
|
||||
},
|
||||
{
|
||||
"style": "Success",
|
||||
"text": "Add the missing node and try again."
|
||||
}
|
||||
]
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"topic": "TS LF Trading Bot Errors",
|
||||
"pageNumber": "21",
|
||||
"type": "TS LF Trading Bot Error - Begin Node Missing",
|
||||
"definition": {
|
||||
"text": "A Begin Node was expected but not found at the node where the error poped up.",
|
||||
"updated": 1611649790597
|
||||
},
|
||||
"paragraphs": [
|
||||
{
|
||||
"style": "Error",
|
||||
"text": "Begin Node Missing",
|
||||
"updated": 1611650355892
|
||||
},
|
||||
{
|
||||
"style": "Success",
|
||||
"text": "Add the missing node and try again."
|
||||
}
|
||||
]
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"topic": "TS LF Trading Bot Errors",
|
||||
"pageNumber": "22",
|
||||
"type": "TS LF Trading Bot Error - End Node Missing",
|
||||
"definition": {
|
||||
"text": "A End Node was expected but not found at the node where the error poped up.",
|
||||
"updated": 1611649805035
|
||||
},
|
||||
"paragraphs": [
|
||||
{
|
||||
"style": "Error",
|
||||
"text": "End Node Missing",
|
||||
"updated": 1611650377127
|
||||
},
|
||||
{
|
||||
"style": "Success",
|
||||
"text": "Add the missing node and try again."
|
||||
}
|
||||
]
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"topic": "TS LF Trading Bot Errors",
|
||||
"pageNumber": "23",
|
||||
"type": "TS LF Trading Bot Error - Rate Node Missing",
|
||||
"definition": {
|
||||
"text": "A Rate Node was expected but not found at the node where the error poped up.",
|
||||
"updated": 1611649820795
|
||||
},
|
||||
"paragraphs": [
|
||||
{
|
||||
"style": "Error",
|
||||
"text": "Rate Node Missing",
|
||||
"updated": 1611650403594
|
||||
},
|
||||
{
|
||||
"style": "Success",
|
||||
"text": "Add the missing node and try again."
|
||||
}
|
||||
]
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"topic": "TS LF Trading Bot Errors",
|
||||
"pageNumber": "24",
|
||||
"type": "TS LF Trading Bot Error - Algorithm Name Node Missing",
|
||||
"definition": {
|
||||
"text": "An Algorithm Name Node was expected but not found at the node where the error poped up.",
|
||||
"updated": 1611649859527
|
||||
},
|
||||
"paragraphs": [
|
||||
{
|
||||
"style": "Error",
|
||||
"text": "Algorithm Name Node Missing",
|
||||
"updated": 1611650424447
|
||||
},
|
||||
{
|
||||
"style": "Success",
|
||||
"text": "Add the missing node and try again."
|
||||
}
|
||||
]
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"topic": "TS LF Trading Bot Errors",
|
||||
"pageNumber": "25",
|
||||
"type": "TS LF Trading Bot Error - Order Counters Node Missing",
|
||||
"definition": {
|
||||
"text": "An Order Counters Node was expected but not found at the node where the error poped up.",
|
||||
"updated": 1611649880412
|
||||
},
|
||||
"paragraphs": [
|
||||
{
|
||||
"style": "Error",
|
||||
"text": "Order Counters Node Missing",
|
||||
"updated": 1611650444896
|
||||
},
|
||||
{
|
||||
"style": "Success",
|
||||
"text": "Add the missing node and try again."
|
||||
}
|
||||
]
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"topic": "TS LF Trading Bot Errors",
|
||||
"pageNumber": "26",
|
||||
"type": "TS LF Trading Bot Error - Periods Node Missing",
|
||||
"definition": {
|
||||
"text": "A Periods Node was expected but not found at the node where the error poped up.",
|
||||
"updated": 1611649909128
|
||||
},
|
||||
"paragraphs": [
|
||||
{
|
||||
"style": "Error",
|
||||
"text": "Periods Node Missing",
|
||||
"updated": 1611650660325
|
||||
},
|
||||
{
|
||||
"style": "Success",
|
||||
"text": "Add the missing node and try again."
|
||||
}
|
||||
]
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"topic": "TS LF Trading Bot Errors",
|
||||
"pageNumber": "27",
|
||||
"type": "TS LF Trading Bot Error - Order Statistics Node Missing",
|
||||
"definition": {
|
||||
"text": "An Order Statistics Node was expected but not found at the node where the error poped up.",
|
||||
"updated": 1611649929741
|
||||
},
|
||||
"paragraphs": [
|
||||
{
|
||||
"style": "Error",
|
||||
"text": "Order Statistics Node Misssing",
|
||||
"updated": 1611650682469
|
||||
},
|
||||
{
|
||||
"style": "Success",
|
||||
"text": "Add the missing node and try again."
|
||||
}
|
||||
]
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"topic": "TS LF Trading Bot Errors",
|
||||
"pageNumber": "28",
|
||||
"type": "TS LF Trading Bot Error - Days Node Missing",
|
||||
"definition": {
|
||||
"text": "A Days Node was expected but not found at the node where the error poped up.",
|
||||
"updated": 1611649947641
|
||||
},
|
||||
"paragraphs": [
|
||||
{
|
||||
"style": "Error",
|
||||
"text": "Days Node Missing",
|
||||
"updated": 1611650706769
|
||||
},
|
||||
{
|
||||
"style": "Success",
|
||||
"text": "Add the missing node and try again."
|
||||
}
|
||||
]
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"topic": "TS LF Trading Bot Errors",
|
||||
"pageNumber": "29",
|
||||
"type": "TS LF Trading Bot Error - Percentage Filled Node Missing",
|
||||
"definition": {
|
||||
"text": "A Percentage Filled Node was expected but not found at the node where the error poped up.",
|
||||
"updated": 1611649967038
|
||||
},
|
||||
"paragraphs": [
|
||||
{
|
||||
"style": "Error",
|
||||
"text": "Percentage Filled Node Missing",
|
||||
"updated": 1611650726302
|
||||
},
|
||||
{
|
||||
"style": "Success",
|
||||
"text": "Add the missing node and try again."
|
||||
}
|
||||
]
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"topic": "TS LF Trading Bot Errors",
|
||||
"pageNumber": "30",
|
||||
"type": "TS LF Trading Bot Error - Actual Rate Node Missing",
|
||||
"definition": {
|
||||
"text": "A Actual Rate Node was expected but not found at the node where the error poped up.",
|
||||
"updated": 1611649989038
|
||||
},
|
||||
"paragraphs": [
|
||||
{
|
||||
"style": "Error",
|
||||
"text": "Rate Node Missing",
|
||||
"updated": 1611650744510
|
||||
},
|
||||
{
|
||||
"style": "Success",
|
||||
"text": "Add the missing node and try again."
|
||||
}
|
||||
]
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"topic": "TS LF Trading Bot Errors",
|
||||
"pageNumber": "31",
|
||||
"type": "TS LF Trading Bot Error - Order Base Asset Node Missing",
|
||||
"definition": {
|
||||
"text": "An Order Base Asset Node was expected but not found at the node where the error poped up.",
|
||||
"updated": 1611650015208
|
||||
},
|
||||
"paragraphs": [
|
||||
{
|
||||
"style": "Error",
|
||||
"text": "Order Base Asset Node Missing",
|
||||
"updated": 1611650767027
|
||||
},
|
||||
{
|
||||
"style": "Success",
|
||||
"text": "Add the missing node and try again."
|
||||
}
|
||||
]
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"topic": "TS LF Trading Bot Errors",
|
||||
"pageNumber": "32",
|
||||
"type": "TS LF Trading Bot Error - Size Node Missing",
|
||||
"definition": {
|
||||
"text": "A Size Node was expected but not found at the node where the error poped up.",
|
||||
"updated": 1611650035884
|
||||
},
|
||||
"paragraphs": [
|
||||
{
|
||||
"style": "Error",
|
||||
"text": "Size Node Missing",
|
||||
"updated": 1611650784941
|
||||
},
|
||||
{
|
||||
"style": "Success",
|
||||
"text": "Add the missing node and try again."
|
||||
}
|
||||
]
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"topic": "TS LF Trading Bot Errors",
|
||||
"pageNumber": "33",
|
||||
"type": "TS LF Trading Bot Error - Size Filled Node Missing",
|
||||
"definition": {
|
||||
"text": "A Size Filled Node was expected but not found at the node where the error poped up.",
|
||||
"updated": 1611650056396
|
||||
},
|
||||
"paragraphs": [
|
||||
{
|
||||
"style": "Error",
|
||||
"text": "Size Filled Node Missing",
|
||||
"updated": 1611650810373
|
||||
},
|
||||
{
|
||||
"style": "Success",
|
||||
"text": "Add the missing node and try again."
|
||||
}
|
||||
]
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"topic": "TS LF Trading Bot Errors",
|
||||
"pageNumber": "34",
|
||||
"type": "TS LF Trading Bot Error - Fees Paid Node Missing",
|
||||
"definition": {
|
||||
"text": "A Fees Paid Node was expected but not found at the node where the error poped up.",
|
||||
"updated": 1611650080043
|
||||
},
|
||||
"paragraphs": [
|
||||
{
|
||||
"style": "Error",
|
||||
"text": "Fees Paid Node Missing",
|
||||
"updated": 1611650830751
|
||||
},
|
||||
{
|
||||
"style": "Success",
|
||||
"text": "Add the missing node and try again."
|
||||
}
|
||||
]
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"topic": "TS LF Trading Bot Errors",
|
||||
"pageNumber": "35",
|
||||
"type": "TS LF Trading Bot Error - Actual Size Node Missing",
|
||||
"definition": {
|
||||
"text": "An Actual Size Node was expected but not found at the node where the error poped up.",
|
||||
"updated": 1611650100230
|
||||
},
|
||||
"paragraphs": [
|
||||
{
|
||||
"style": "Error",
|
||||
"text": "Actual Size Node Missing",
|
||||
"updated": 1611650850857
|
||||
},
|
||||
{
|
||||
"style": "Success",
|
||||
"text": "Add the missing node and try again."
|
||||
}
|
||||
]
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"topic": "TS LF Trading Bot Errors",
|
||||
"pageNumber": "36",
|
||||
"type": "TS LF Trading Bot Error - Amount Received Node Missing",
|
||||
"definition": {
|
||||
"text": "A Amount Received Node was expected but not found at the node where the error poped up.",
|
||||
"updated": 1611650122772
|
||||
},
|
||||
"paragraphs": [
|
||||
{
|
||||
"style": "Error",
|
||||
"text": "Amount Received Node Missing",
|
||||
"updated": 1611650872000
|
||||
},
|
||||
{
|
||||
"style": "Success",
|
||||
"text": "Add the missing node and try again."
|
||||
}
|
||||
]
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"topic": "TS LF Trading Bot Errors",
|
||||
"pageNumber": "37",
|
||||
"type": "TS LF Trading Bot Error - Fees To Be Paid Node Missing",
|
||||
"definition": {
|
||||
"text": "A Fees To Be Paid Node was expected but not found at the node where the error poped up.",
|
||||
"updated": 1611650142288
|
||||
},
|
||||
"paragraphs": [
|
||||
{
|
||||
"style": "Error",
|
||||
"text": "Fees To Be Paid Node Missing",
|
||||
"updated": 1611650893565
|
||||
},
|
||||
{
|
||||
"style": "Success",
|
||||
"text": "Add the missing node and try again."
|
||||
}
|
||||
]
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"topic": "TS LF Trading Bot Errors",
|
||||
"pageNumber": "38",
|
||||
"type": "TS LF Trading Bot Error - Order Quoted Asset Node Missing",
|
||||
"definition": {
|
||||
"text": "A Order Quoted Asset Node was expected but not found at the node where the error poped up.",
|
||||
"updated": 1611650168650
|
||||
},
|
||||
"paragraphs": [
|
||||
{
|
||||
"style": "Error",
|
||||
"text": "Order Quoted Asset Node Missing",
|
||||
"updated": 1611650915963
|
||||
},
|
||||
{
|
||||
"style": "Success",
|
||||
"text": "Add the missing node and try again."
|
||||
}
|
||||
]
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"topic": "TS LF Trading Bot Errors",
|
||||
"pageNumber": "39",
|
||||
"type": "TS LF Trading Bot Error - Order Rate Node Missing",
|
||||
"definition": {
|
||||
"text": "A Order Rate Node was expected but not found at the node where the error poped up.",
|
||||
"updated": 1611650190281
|
||||
},
|
||||
"paragraphs": [
|
||||
{
|
||||
"style": "Error",
|
||||
"text": "Order Rate Node Missing",
|
||||
"updated": 1611650934529
|
||||
},
|
||||
{
|
||||
"style": "Success",
|
||||
"text": "Add the missing node and try again."
|
||||
}
|
||||
]
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"topic": "TS LF Trading Bot Errors",
|
||||
"pageNumber": "40",
|
||||
"type": "TS LF Trading Bot Error - Rate Value Undefined",
|
||||
"definition": {
|
||||
"text": "Write a summary for this topic page."
|
||||
},
|
||||
"paragraphs": [
|
||||
{
|
||||
"style": "Error",
|
||||
"text": "Rate Value Undefined",
|
||||
"updated": 1611651100958
|
||||
}
|
||||
]
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"topic": "TS LF Trading Bot Errors",
|
||||
"pageNumber": "41",
|
||||
"type": "TS LF Trading Bot Error - Rate Value Not A Number",
|
||||
"definition": {
|
||||
"text": "Write a summary for this topic page."
|
||||
},
|
||||
"paragraphs": [
|
||||
{
|
||||
"style": "Error",
|
||||
"text": "Rate Value Not A Number",
|
||||
"updated": 1611651124687
|
||||
}
|
||||
]
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"topic": "TS LF Trading Bot Errors",
|
||||
"pageNumber": "42",
|
||||
"type": "TS LF Trading Bot Error - Rate Value Zero Or Negative",
|
||||
"definition": {
|
||||
"text": "Write a summary for this topic page."
|
||||
},
|
||||
"paragraphs": [
|
||||
{
|
||||
"style": "Error",
|
||||
"text": "Rate Value Zero Or Negative",
|
||||
"updated": 1611651177927
|
||||
}
|
||||
]
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"topic": "TS LF Trading Bot Errors",
|
||||
"pageNumber": "43",
|
||||
"type": "TS LF Trading Bot Error - Percentage Of Stage Target Size Property Missing",
|
||||
"definition": {
|
||||
"text": "Write a summary for this topic page."
|
||||
},
|
||||
"paragraphs": [
|
||||
{
|
||||
"style": "Error",
|
||||
"text": "Percentage Of Stage Target Size Property Missing",
|
||||
"updated": 1611651247391
|
||||
}
|
||||
]
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"topic": "TS LF Trading Bot Errors",
|
||||
"pageNumber": "44",
|
||||
"type": "TS LF Trading Bot Error - Percentage Of Stage Target Size Property Not A Number",
|
||||
"definition": {
|
||||
"text": "Write a summary for this topic page."
|
||||
},
|
||||
"paragraphs": [
|
||||
{
|
||||
"style": "Error",
|
||||
"text": "Percentage Of Stage Target Size Property Not A Number",
|
||||
"updated": 1611651274703
|
||||
}
|
||||
]
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"topic": "TS LF Trading Bot Errors",
|
||||
"pageNumber": "45",
|
||||
"type": "TS LF Trading Bot Error - Percentage Of Algorithm Size Property Not A Number",
|
||||
"definition": {
|
||||
"text": "Write a summary for this topic page."
|
||||
},
|
||||
"paragraphs": [
|
||||
{
|
||||
"style": "Error",
|
||||
"text": "Percentage Of Algorithm Size Property Not A Number",
|
||||
"updated": 1611651354529
|
||||
}
|
||||
]
|
||||
}
|
||||
+4
-2
@@ -75,8 +75,10 @@ exports.newSuperalgosBotModulesTradingExecution = function (processIndex) {
|
||||
}
|
||||
|
||||
} catch (err) {
|
||||
tradingSystem.errors.push([executionNode.id, err.message])
|
||||
|
||||
if (err !== 'Error Already Recorded') {
|
||||
tradingSystem.errors.push([executionNode.id, err.message])
|
||||
}
|
||||
|
||||
if (typeof err === 'string' || err instanceof String) {
|
||||
TS.projects.superalgos.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME, '[ERROR] runExecution -> err = ' + err)
|
||||
}
|
||||
|
||||
+57
-40
@@ -88,12 +88,12 @@ exports.newSuperalgosBotModulesTradingOrders = function (processIndex) {
|
||||
for (let i = 0; i < orders.length; i++) {
|
||||
let tradingSystemOrder = orders[i]
|
||||
if (tradingSystemOrder.referenceParent === undefined) {
|
||||
badDefinitionUnhandledException(undefined, 'tradingSystemOrder.referenceParent === undefined', tradingSystemOrder)
|
||||
badDefinitionUnhandledException(undefined, 'Order Reference Missing', tradingSystemOrder)
|
||||
}
|
||||
let tradingEngineOrder = TS.projects.superalgos.globals.processModuleObjects.MODULE_OBJECTS_BY_PROCESS_INDEX_MAP.get(processIndex).TRADING_ENGINE_MODULE_OBJECT.getNodeById(tradingSystemOrder.referenceParent.id)
|
||||
|
||||
if (tradingEngineOrder.status === undefined) {
|
||||
badDefinitionUnhandledException(undefined, 'tradingEngineOrder.status === undefined', tradingEngineOrder)
|
||||
badDefinitionUnhandledException(undefined, 'Status Node Missing', tradingEngineOrder)
|
||||
}
|
||||
|
||||
if (mantain === true) {
|
||||
@@ -220,39 +220,44 @@ exports.newSuperalgosBotModulesTradingOrders = function (processIndex) {
|
||||
|
||||
function tradingSystemValidations(tradingSystemOrder) {
|
||||
/* Trading System Validations */
|
||||
if (tradingSystemOrder.config.percentageOfAlgorithmSize === undefined) { badDefinitionUnhandledException(undefined, 'tradingSystemOrder.config.percentageOfAlgorithmSize === undefined', tradingSystemOrder) }
|
||||
if (tradingSystemOrder.referenceParent === undefined) { badDefinitionUnhandledException(undefined, 'tradingSystemOrder.referenceParent === undefined', tradingSystemOrder) }
|
||||
if (tradingSystemOrder.config.percentageOfAlgorithmSize === undefined) { badDefinitionUnhandledException(undefined, 'Percentage Of Algorithm Size Property Missing', tradingSystemOrder) }
|
||||
if (tradingSystemOrder.referenceParent === undefined) { badDefinitionUnhandledException(undefined, 'Order Reference Missing', tradingSystemOrder) }
|
||||
}
|
||||
|
||||
function tradingEngineValidations(tradingEngineOrder) {
|
||||
/* Trading Engine Order Validations */
|
||||
if (tradingEngineOrder.serialNumber === undefined) { badDefinitionUnhandledException(undefined, 'tradingEngineOrder.serialNumber === undefined', tradingEngineOrder) }
|
||||
if (tradingEngineOrder.identifier === undefined) { badDefinitionUnhandledException(undefined, 'tradingEngineOrder.identifier === undefined', tradingEngineOrder) }
|
||||
if (tradingEngineOrder.exchangeId === undefined) { badDefinitionUnhandledException(undefined, 'tradingEngineOrder.exchangeId === undefined', tradingEngineOrder) }
|
||||
if (tradingEngineOrder.begin === undefined) { badDefinitionUnhandledException(undefined, 'tradingEngineOrder.begin === undefined', tradingEngineOrder) }
|
||||
if (tradingEngineOrder.end === undefined) { badDefinitionUnhandledException(undefined, 'tradingEngineOrder.end === undefined', tradingEngineOrder) }
|
||||
if (tradingEngineOrder.rate === undefined) { badDefinitionUnhandledException(undefined, 'tradingEngineOrder.rate === undefined', tradingEngineOrder) }
|
||||
if (tradingEngineOrder.status === undefined) { badDefinitionUnhandledException(undefined, 'tradingEngineOrder.status === undefined', tradingEngineOrder) }
|
||||
if (tradingEngineOrder.algorithmName === undefined) { badDefinitionUnhandledException(undefined, 'tradingEngineOrder.algorithmName === undefined', tradingEngineOrder) }
|
||||
if (tradingEngineOrder.orderCounters === undefined) { badDefinitionUnhandledException(undefined, 'tradingEngineOrder.orderCounters === undefined', tradingEngineOrder) }
|
||||
if (tradingEngineOrder.orderCounters.periods === undefined) { badDefinitionUnhandledException(undefined, 'tradingEngineOrder.orderCounters.periods === undefined', tradingEngineOrder) }
|
||||
if (tradingEngineOrder.orderStatistics.days === undefined) { badDefinitionUnhandledException(undefined, 'tradingEngineOrder.orderStatistics.days === undefined', tradingEngineOrder) }
|
||||
if (tradingEngineOrder.orderStatistics.percentageFilled === undefined) { badDefinitionUnhandledException(undefined, 'tradingEngineOrder.orderStatistics.percentageFilled === undefined', tradingEngineOrder) }
|
||||
if (tradingEngineOrder.orderStatistics.actualRate === undefined) { badDefinitionUnhandledException(undefined, 'tradingEngineOrder.orderStatistics.actualRate === undefined', tradingEngineOrder) }
|
||||
if (tradingEngineOrder.serialNumber === undefined) { badDefinitionUnhandledException(undefined, 'Serial Number Node Missing', tradingEngineOrder) }
|
||||
if (tradingEngineOrder.identifier === undefined) { badDefinitionUnhandledException(undefined, 'Identifier Node Missing', tradingEngineOrder) }
|
||||
if (tradingEngineOrder.exchangeId === undefined) { badDefinitionUnhandledException(undefined, 'Exchange Id Node Missing', tradingEngineOrder) }
|
||||
if (tradingEngineOrder.begin === undefined) { badDefinitionUnhandledException(undefined, 'Begin Node Missing', tradingEngineOrder) }
|
||||
if (tradingEngineOrder.end === undefined) { badDefinitionUnhandledException(undefined, 'End Node Missing', tradingEngineOrder) }
|
||||
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) }
|
||||
|
||||
if (tradingEngineOrder.orderBaseAsset.size === undefined) { badDefinitionUnhandledException(undefined, 'tradingEngineOrder.orderBaseAsset.size === undefined', tradingEngineOrder) }
|
||||
if (tradingEngineOrder.orderBaseAsset.sizeFilled === undefined) { badDefinitionUnhandledException(undefined, 'tradingEngineOrder.orderBaseAsset.sizeFilled === undefined', tradingEngineOrder) }
|
||||
if (tradingEngineOrder.orderBaseAsset.feesPaid === undefined) { badDefinitionUnhandledException(undefined, 'tradingEngineOrder.orderBaseAsset.feesPaid === undefined', tradingEngineOrder) }
|
||||
if (tradingEngineOrder.orderBaseAsset.actualSize === undefined) { badDefinitionUnhandledException(undefined, 'tradingEngineOrder.orderBaseAsset.actualSize === undefined', tradingEngineOrder) }
|
||||
if (tradingEngineOrder.orderBaseAsset.amountReceived === undefined) { badDefinitionUnhandledException(undefined, 'tradingEngineOrder.orderBaseAsset.amountReceived === undefined', tradingEngineOrder) }
|
||||
if (tradingEngineOrder.orderBaseAsset.feesToBePaid === undefined) { badDefinitionUnhandledException(undefined, 'tradingEngineOrder.orderBaseAsset.feesToBePaid === undefined', tradingEngineOrder) }
|
||||
if (tradingEngineOrder.orderStatistics === undefined) { badDefinitionUnhandledException(undefined, 'Order Statistics Node Missing', tradingEngineOrder) }
|
||||
if (tradingEngineOrder.orderStatistics.days === undefined) { badDefinitionUnhandledException(undefined, 'Days Node Missing', tradingEngineOrder.orderStatistics) }
|
||||
if (tradingEngineOrder.orderStatistics.percentageFilled === undefined) { badDefinitionUnhandledException(undefined, 'Percentage Filled Node Missing', tradingEngineOrder.orderStatistics) }
|
||||
if (tradingEngineOrder.orderStatistics.actualRate === undefined) { badDefinitionUnhandledException(undefined, 'Actual Rate Node Missing', tradingEngineOrder.orderStatistics) }
|
||||
|
||||
if (tradingEngineOrder.orderQuotedAsset.size === undefined) { badDefinitionUnhandledException(undefined, 'tradingEngineOrder.orderQuotedAsset.size === undefined', tradingEngineOrder) }
|
||||
if (tradingEngineOrder.orderQuotedAsset.sizeFilled === undefined) { badDefinitionUnhandledException(undefined, 'tradingEngineOrder.orderQuotedAsset.sizeFilled === undefined', tradingEngineOrder) }
|
||||
if (tradingEngineOrder.orderQuotedAsset.feesPaid === undefined) { badDefinitionUnhandledException(undefined, 'tradingEngineOrder.orderQuotedAsset.feesPaid === undefined', tradingEngineOrder) }
|
||||
if (tradingEngineOrder.orderQuotedAsset.actualSize === undefined) { badDefinitionUnhandledException(undefined, 'tradingEngineOrder.orderQuotedAsset.actualSize === undefined', tradingEngineOrder) }
|
||||
if (tradingEngineOrder.orderQuotedAsset.amountReceived === undefined) { badDefinitionUnhandledException(undefined, 'tradingEngineOrder.orderQuotedAsset.amountReceived === undefined', tradingEngineOrder) }
|
||||
if (tradingEngineOrder.orderQuotedAsset.feesToBePaid === undefined) { badDefinitionUnhandledException(undefined, 'tradingEngineOrder.orderQuotedAsset.feesToBePaid === undefined', tradingEngineOrder) }
|
||||
if (tradingEngineOrder.orderBaseAsset === undefined) { badDefinitionUnhandledException(undefined, 'Order Base Asset Node Missing', tradingEngineOrder) }
|
||||
if (tradingEngineOrder.orderBaseAsset.size === undefined) { badDefinitionUnhandledException(undefined, 'Size Node Missing', tradingEngineOrder.orderBaseAsset) }
|
||||
if (tradingEngineOrder.orderBaseAsset.sizeFilled === undefined) { badDefinitionUnhandledException(undefined, 'Size Filled Node Missing', tradingEngineOrder.orderBaseAsset) }
|
||||
if (tradingEngineOrder.orderBaseAsset.feesPaid === undefined) { badDefinitionUnhandledException(undefined, 'Fees Paid Node Missing', tradingEngineOrder.orderBaseAsset) }
|
||||
if (tradingEngineOrder.orderBaseAsset.actualSize === undefined) { badDefinitionUnhandledException(undefined, 'Actual Size Node Missing', tradingEngineOrder.orderBaseAsset) }
|
||||
if (tradingEngineOrder.orderBaseAsset.amountReceived === undefined) { badDefinitionUnhandledException(undefined, 'Amount Received Node Missing', tradingEngineOrder.orderBaseAsset) }
|
||||
if (tradingEngineOrder.orderBaseAsset.feesToBePaid === undefined) { badDefinitionUnhandledException(undefined, 'Fees To Be Paid Node Missing', tradingEngineOrder.orderBaseAsset) }
|
||||
|
||||
if (tradingEngineOrder.orderQuotedAsset === undefined) { badDefinitionUnhandledException(undefined, 'Order Quoted Asset Node Missing', tradingEngineOrder) }
|
||||
if (tradingEngineOrder.orderQuotedAsset.size === undefined) { badDefinitionUnhandledException(undefined, 'Size Node Missing', tradingEngineOrder.orderQuotedAsset) }
|
||||
if (tradingEngineOrder.orderQuotedAsset.sizeFilled === undefined) { badDefinitionUnhandledException(undefined, 'Size Filled Node Missing', tradingEngineOrder.orderQuotedAsset) }
|
||||
if (tradingEngineOrder.orderQuotedAsset.feesPaid === undefined) { badDefinitionUnhandledException(undefined, 'Fees Paid Node Missing', tradingEngineOrder.orderQuotedAsset) }
|
||||
if (tradingEngineOrder.orderQuotedAsset.actualSize === undefined) { badDefinitionUnhandledException(undefined, 'Actual Size Node Missing', tradingEngineOrder.orderQuotedAsset) }
|
||||
if (tradingEngineOrder.orderQuotedAsset.amountReceived === undefined) { badDefinitionUnhandledException(undefined, 'Amount Received Node Missing', tradingEngineOrder.orderQuotedAsset) }
|
||||
if (tradingEngineOrder.orderQuotedAsset.feesToBePaid === undefined) { badDefinitionUnhandledException(undefined, 'Fees To Be Paid Node Missing', tradingEngineOrder.orderQuotedAsset) }
|
||||
}
|
||||
|
||||
async function tryToOpenOrder(tradingEngineStage, executionAlgorithm, tradingSystemOrder, tradingEngineOrder, situationName) {
|
||||
@@ -319,16 +324,16 @@ exports.newSuperalgosBotModulesTradingOrders = function (processIndex) {
|
||||
|
||||
/* Optional Rate Definition */
|
||||
if (tradingSystemOrder.type === 'Limit Buy Order' || tradingSystemOrder.type === 'Limit Sell Order') {
|
||||
if (tradingSystemOrder.orderRate === undefined) { badDefinitionUnhandledException(undefined, 'tradingSystemOrder.orderRate === undefined', tradingSystemOrder) }
|
||||
if (tradingSystemOrder.orderRate.formula === undefined) { badDefinitionUnhandledException(undefined, 'tradingSystemOrder.orderRate.formula === undefined', tradingSystemOrder) }
|
||||
if (tradingSystemOrder.orderRate === undefined) { badDefinitionUnhandledException(undefined, 'Order Rate Node Missing', tradingSystemOrder) }
|
||||
if (tradingSystemOrder.orderRate.formula === undefined) { badDefinitionUnhandledException(undefined, 'Formula Node Missing', tradingSystemOrder) }
|
||||
|
||||
/* Extract the rate value from the user-defined formula */
|
||||
tradingEngineOrder.rate.value = tradingSystem.formulas.get(tradingSystemOrder.orderRate.formula.id)
|
||||
|
||||
/* Final rate validations */
|
||||
if (tradingEngineOrder.rate.value === undefined) { badDefinitionUnhandledException(undefined, 'tradingEngineOrder.rate.value === undefined', tradingSystemOrder) }
|
||||
if (isNaN(tradingEngineOrder.rate.value) === true) { badDefinitionUnhandledException(undefined, 'isNaN(tradingEngineOrder.rate.value) === true', tradingSystemOrder) }
|
||||
if (tradingEngineOrder.rate.value <= 0) { badDefinitionUnhandledException(undefined, 'tradingEngineOrder.rate.value <= 0', tradingSystemOrder) }
|
||||
if (tradingEngineOrder.rate.value === undefined) { badDefinitionUnhandledException(undefined, 'Rate Value Undefined', tradingEngineOrder.rate) }
|
||||
if (isNaN(tradingEngineOrder.rate.value) === true) { badDefinitionUnhandledException(undefined, 'Rate Value Not A Number', tradingSystemOrder) }
|
||||
if (tradingEngineOrder.rate.value <= 0) { badDefinitionUnhandledException(undefined, 'Rate Value Zero Or Negative', tradingSystemOrder) }
|
||||
|
||||
tradingEngineOrder.rate.value = TS.projects.superalgos.utilities.miscellaneousFunctions.truncateToThisPrecision(tradingEngineOrder.rate.value, 10)
|
||||
} else {
|
||||
@@ -351,10 +356,10 @@ exports.newSuperalgosBotModulesTradingOrders = function (processIndex) {
|
||||
function requiredConfigurationValidation() {
|
||||
/* Validate that this config exists */
|
||||
if (executionAlgorithm.config.percentageOfStageTargetSize === undefined) {
|
||||
badDefinitionUnhandledException(undefined, 'executionAlgorithm.config.percentageOfStageTargetSize === undefined', executionAlgorithm)
|
||||
badDefinitionUnhandledException(undefined, 'Percentage Of Stage Target Size Property Missing', executionAlgorithm)
|
||||
}
|
||||
if (isNaN(executionAlgorithm.config.percentageOfStageTargetSize) === true) {
|
||||
badDefinitionUnhandledException(undefined, 'isNaN(executionAlgorithm.config.percentageOfStageTargetSize) === true', executionAlgorithm)
|
||||
badDefinitionUnhandledException(undefined, 'Percentage Of Stage Target Size Property Not A Number', executionAlgorithm)
|
||||
}
|
||||
|
||||
algorithmSizeInBaseAsset = tradingEngineStage.stageBaseAsset.targetSize.value * executionAlgorithm.config.percentageOfStageTargetSize / 100
|
||||
@@ -362,10 +367,10 @@ exports.newSuperalgosBotModulesTradingOrders = function (processIndex) {
|
||||
|
||||
/* Validate that this config exists */
|
||||
if (tradingSystemOrder.config.percentageOfAlgorithmSize === undefined) {
|
||||
badDefinitionUnhandledException(undefined, 'tradingSystemOrder.config.percentageOfAlgorithmSize === undefined', tradingSystemOrder)
|
||||
badDefinitionUnhandledException(undefined, 'Percentage Of Algorithm Size Property Missing', tradingSystemOrder)
|
||||
}
|
||||
if (isNaN(tradingSystemOrder.config.percentageOfAlgorithmSize) === true) {
|
||||
badDefinitionUnhandledException(undefined, 'isNaN(tradingSystemOrder.config.percentageOfAlgorithmSize) === true', tradingSystemOrder)
|
||||
badDefinitionUnhandledException(undefined, 'Percentage Of Algorithm Size Property Not A Number', tradingSystemOrder)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1061,7 +1066,15 @@ exports.newSuperalgosBotModulesTradingOrders = function (processIndex) {
|
||||
}
|
||||
|
||||
function badDefinitionUnhandledException(err, message, node) {
|
||||
tradingSystem.errors.push([node.id, message])
|
||||
|
||||
let docs = {
|
||||
project: 'Superalgos',
|
||||
category: 'Topic',
|
||||
type: 'TS LF Trading Bot Error - ' + message,
|
||||
placeholder: {}
|
||||
}
|
||||
|
||||
tradingSystem.errors.push([node.id, message, docs])
|
||||
|
||||
TS.projects.superalgos.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME, "[ERROR] -> " + message);
|
||||
TS.projects.superalgos.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME, "[ERROR] -> node.name = " + node.name);
|
||||
@@ -1070,7 +1083,11 @@ exports.newSuperalgosBotModulesTradingOrders = function (processIndex) {
|
||||
if (err !== undefined) {
|
||||
TS.projects.superalgos.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME, "[ERROR] -> err.stack = " + err.stack);
|
||||
}
|
||||
throw 'Please fix the problem and try again.'
|
||||
/*
|
||||
Now we are going to abort this execution and jump to the latest error handler
|
||||
signaling that we already recorded the error to avoid duplicates.
|
||||
*/
|
||||
throw 'Error Already Recorded'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -558,7 +558,7 @@ function newRateScale() {
|
||||
|
||||
let labelArray = label.split('.')
|
||||
let label1 = thisObject.payload.node.payload.parentNode.name
|
||||
let label2 = (Math.trunc(rate)).toUTCString()
|
||||
let label2 = (Math.trunc(rate)).toLocaleString()
|
||||
let label3 = labelArray[1]
|
||||
if (label3 === undefined) { label3 = '00' }
|
||||
|
||||
|
||||
@@ -264,7 +264,7 @@ function newUiObjectConstructor() {
|
||||
currentStatus: true,
|
||||
label: undefined,
|
||||
visible: true,
|
||||
icons: ['set-node-arrangement-to-concave', 'set-node-arrangement-to-convex ', 'set-node-arrangement-to-vertical-right', 'set-node-arrangement-to-vertical-left', 'set-node-arrangement-to-horizontal-bottom', 'set-node-arrangement-to-horizontal-top'],
|
||||
icons: ['set-node-arrangement-to-concave', 'set-node-arrangement-to-convex', 'set-node-arrangement-to-vertical-right', 'set-node-arrangement-to-vertical-left', 'set-node-arrangement-to-horizontal-bottom', 'set-node-arrangement-to-horizontal-top'],
|
||||
rawRadius: 12,
|
||||
targetRadius: 0,
|
||||
currentRadius: 0,
|
||||
|
||||
@@ -224,7 +224,7 @@ function newSuperalgosUtilitiesDrawPrint() {
|
||||
if (fixedDecimals !== true) {
|
||||
label = dynamicDecimals(labelToPrint, minDecimals)
|
||||
}
|
||||
label = label.toUTCString()
|
||||
label = label.toLocaleString()
|
||||
if (noDecimals === true) {
|
||||
label = Math.trunc(label)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user