diff --git a/Projects/Superalgos/PNGs/Docs/debugging-your-indicator/10_network.png b/Projects/Superalgos/PNGs/Docs/debugging-your-indicator/10_network.png new file mode 100644 index 000000000..ec7b909fe Binary files /dev/null and b/Projects/Superalgos/PNGs/Docs/debugging-your-indicator/10_network.png differ diff --git a/Projects/Superalgos/PNGs/Docs/debugging-your-indicator/11_expand-data-tasks.png b/Projects/Superalgos/PNGs/Docs/debugging-your-indicator/11_expand-data-tasks.png new file mode 100644 index 000000000..4f3a2ff05 Binary files /dev/null and b/Projects/Superalgos/PNGs/Docs/debugging-your-indicator/11_expand-data-tasks.png differ diff --git a/Projects/Superalgos/PNGs/Docs/debugging-your-indicator/12_debug-your-indicator-task.png b/Projects/Superalgos/PNGs/Docs/debugging-your-indicator/12_debug-your-indicator-task.png new file mode 100644 index 000000000..572d81725 Binary files /dev/null and b/Projects/Superalgos/PNGs/Docs/debugging-your-indicator/12_debug-your-indicator-task.png differ diff --git a/Projects/Superalgos/PNGs/Docs/debugging-your-indicator/13_check-your-indicator-starts.png b/Projects/Superalgos/PNGs/Docs/debugging-your-indicator/13_check-your-indicator-starts.png new file mode 100644 index 000000000..f64f65353 Binary files /dev/null and b/Projects/Superalgos/PNGs/Docs/debugging-your-indicator/13_check-your-indicator-starts.png differ diff --git a/Projects/Superalgos/PNGs/Docs/debugging-your-indicator/14_check-debug-terminal.png b/Projects/Superalgos/PNGs/Docs/debugging-your-indicator/14_check-debug-terminal.png new file mode 100644 index 000000000..9c27b36f0 Binary files /dev/null and b/Projects/Superalgos/PNGs/Docs/debugging-your-indicator/14_check-debug-terminal.png differ diff --git a/Projects/Superalgos/PNGs/Docs/debugging-your-indicator/15_run-ohlcvs.png b/Projects/Superalgos/PNGs/Docs/debugging-your-indicator/15_run-ohlcvs.png new file mode 100644 index 000000000..d48b191a9 Binary files /dev/null and b/Projects/Superalgos/PNGs/Docs/debugging-your-indicator/15_run-ohlcvs.png differ diff --git a/Projects/Superalgos/PNGs/Docs/debugging-your-indicator/16_run-dependencies.png b/Projects/Superalgos/PNGs/Docs/debugging-your-indicator/16_run-dependencies.png new file mode 100644 index 000000000..4b759a78d Binary files /dev/null and b/Projects/Superalgos/PNGs/Docs/debugging-your-indicator/16_run-dependencies.png differ diff --git a/Projects/Superalgos/PNGs/Docs/debugging-your-indicator/17_stopped-at-breaking-point.png b/Projects/Superalgos/PNGs/Docs/debugging-your-indicator/17_stopped-at-breaking-point.png new file mode 100644 index 000000000..5dbc4d146 Binary files /dev/null and b/Projects/Superalgos/PNGs/Docs/debugging-your-indicator/17_stopped-at-breaking-point.png differ diff --git a/Projects/Superalgos/PNGs/Docs/debugging-your-indicator/18_zoomed-in-getting-values.png b/Projects/Superalgos/PNGs/Docs/debugging-your-indicator/18_zoomed-in-getting-values.png new file mode 100644 index 000000000..bba41694a Binary files /dev/null and b/Projects/Superalgos/PNGs/Docs/debugging-your-indicator/18_zoomed-in-getting-values.png differ diff --git a/Projects/Superalgos/PNGs/Docs/debugging-your-indicator/1_open-folder.png b/Projects/Superalgos/PNGs/Docs/debugging-your-indicator/1_open-folder.png new file mode 100644 index 000000000..4b5f82358 Binary files /dev/null and b/Projects/Superalgos/PNGs/Docs/debugging-your-indicator/1_open-folder.png differ diff --git a/Projects/Superalgos/PNGs/Docs/debugging-your-indicator/2_taskserver-folder.png b/Projects/Superalgos/PNGs/Docs/debugging-your-indicator/2_taskserver-folder.png new file mode 100644 index 000000000..38fcbc5f4 Binary files /dev/null and b/Projects/Superalgos/PNGs/Docs/debugging-your-indicator/2_taskserver-folder.png differ diff --git a/Projects/Superalgos/PNGs/Docs/debugging-your-indicator/3_add-folder.png b/Projects/Superalgos/PNGs/Docs/debugging-your-indicator/3_add-folder.png new file mode 100644 index 000000000..b4aff5eaa Binary files /dev/null and b/Projects/Superalgos/PNGs/Docs/debugging-your-indicator/3_add-folder.png differ diff --git a/Projects/Superalgos/PNGs/Docs/debugging-your-indicator/4_projects-folder.png b/Projects/Superalgos/PNGs/Docs/debugging-your-indicator/4_projects-folder.png new file mode 100644 index 000000000..e1033ffca Binary files /dev/null and b/Projects/Superalgos/PNGs/Docs/debugging-your-indicator/4_projects-folder.png differ diff --git a/Projects/Superalgos/PNGs/Docs/debugging-your-indicator/5_locate-singlemarket-in-tree.png b/Projects/Superalgos/PNGs/Docs/debugging-your-indicator/5_locate-singlemarket-in-tree.png new file mode 100644 index 000000000..64c0cb267 Binary files /dev/null and b/Projects/Superalgos/PNGs/Docs/debugging-your-indicator/5_locate-singlemarket-in-tree.png differ diff --git a/Projects/Superalgos/PNGs/Docs/debugging-your-indicator/6_find-line-for-breakpoint.png b/Projects/Superalgos/PNGs/Docs/debugging-your-indicator/6_find-line-for-breakpoint.png new file mode 100644 index 000000000..e63659d10 Binary files /dev/null and b/Projects/Superalgos/PNGs/Docs/debugging-your-indicator/6_find-line-for-breakpoint.png differ diff --git a/Projects/Superalgos/PNGs/Docs/debugging-your-indicator/7_breaking-point-indication.png b/Projects/Superalgos/PNGs/Docs/debugging-your-indicator/7_breaking-point-indication.png new file mode 100644 index 000000000..0d4a283f2 Binary files /dev/null and b/Projects/Superalgos/PNGs/Docs/debugging-your-indicator/7_breaking-point-indication.png differ diff --git a/Projects/Superalgos/PNGs/Docs/debugging-your-indicator/8_node-run.png b/Projects/Superalgos/PNGs/Docs/debugging-your-indicator/8_node-run.png new file mode 100644 index 000000000..16479299b Binary files /dev/null and b/Projects/Superalgos/PNGs/Docs/debugging-your-indicator/8_node-run.png differ diff --git a/Projects/Superalgos/PNGs/Docs/debugging-your-indicator/9_start-debugging.png b/Projects/Superalgos/PNGs/Docs/debugging-your-indicator/9_start-debugging.png new file mode 100644 index 000000000..32a111765 Binary files /dev/null and b/Projects/Superalgos/PNGs/Docs/debugging-your-indicator/9_start-debugging.png differ diff --git a/Projects/Superalgos/Schemas/Docs-Topics/debugging-your-indicator-001-debugging-your-indicator.json b/Projects/Superalgos/Schemas/Docs-Topics/debugging-your-indicator-001-debugging-your-indicator.json new file mode 100644 index 000000000..90701c570 --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Topics/debugging-your-indicator-001-debugging-your-indicator.json @@ -0,0 +1,42 @@ +{ + "topic": "Debugging your indicator", + "pageNumber": "1", + "type": "Debugging your indicator", + "definition": { + "text": "Using an Integrated development environment (IDE) will help you catch bugs.", + "updated": 1614257102916 + }, + "paragraphs": [ + { + "style": "Note", + "text": "For the following steps, we are going to show the concept of debugging using Visual Studio Code. You may use any other Integrated development environment (IDE) that you feel comfortable with.", + "updated": 1614264361700 + }, + { + "style": "Subtitle", + "text": "
", + "updated": 1614264382973 + }, + { + "style": "Subtitle", + "text": "\"Our greatest weakness lies in giving up. The most certain way to succeed is always to try just one more time.\" -Thomas Edison" + }, + { + "style": "Subtitle", + "text": "
" + }, + { + "style": "Text", + "text": "So, you've come up with your new indicator idea, jotted down the outlines, translated it into code - Perfect!...then it stops with an error.", + "updated": 1614257276497 + }, + { + "style": "Text", + "text": "Grab some coffee and mosquito repellent - We're going bug hunting." + }, + { + "style": "Text", + "text": "Get Visual Studio Code" + } + ] +} \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Topics/debugging-your-indicator-002-setting-up-your-ide.json b/Projects/Superalgos/Schemas/Docs-Topics/debugging-your-indicator-002-setting-up-your-ide.json new file mode 100644 index 000000000..07beb893f --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Topics/debugging-your-indicator-002-setting-up-your-ide.json @@ -0,0 +1,75 @@ +{ + "topic": "Debugging your indicator", + "pageNumber": "2", + "type": "Setting up your IDE", + "definition": { + "text": "Toggling Breakpoints is telling the the program where to slow down - Where we'd like to take control", + "updated": 1614264846619 + }, + "paragraphs": [ + { + "style": "Text", + "text": "Start up your IDE and Add the \"TaskServer\" folder (../Superalgos/TaskServer) to your workspace.", + "updated": 1614331592978 + }, + { + "style": "Png", + "text": "PNGs/Superalgos/Docs/debugging-your-indicator/1_open-folder.png", + "updated": 1614329413344 + }, + { + "style": "Png", + "text": "PNGs/Superalgos/Docs/debugging-your-indicator/2_taskserver-folder.png", + "updated": 1614331239911 + }, + { + "style": "Text", + "text": "Also Add the \"Projects\" (../Superalgos/Projects) folder to your workspace.", + "updated": 1614331619021 + }, + { + "style": "Png", + "text": "PNGs/Superalgos/Docs/debugging-your-indicator/3_add-folder.png", + "updated": 1614331194799 + }, + { + "style": "Png", + "text": "PNGs/Superalgos/Docs/debugging-your-indicator/4_projects-folder.png", + "updated": 1614331302498 + }, + { + "style": "Text", + "text": "Locate and open the file \"SingleMarketFunctions.js\" (..Superalgos\\Projects\\Superalgos\\TS\\Function-Libraries\\SingleMarketFunctions.js)." + }, + { + "style": "Png", + "text": "PNGs/Superalgos/Docs/debugging-your-indicator/5_locate-singlemarket-in-tree.png" + }, + { + "style": "Text", + "text": "Now we will have to find the line in the code where we'd like the process to stop, and show us what's really happening.", + "updated": 1614331648050 + }, + { + "style": "Png", + "text": "PNGs/Superalgos/Docs/debugging-your-indicator/6_find-line-for-breakpoint.png" + }, + { + "style": "Text", + "text": "This point would be the line that says:" + }, + { + "style": "Text", + "text": "\"eval(dataBuildingProcedure.loop.procedureJavascriptCode.code)\"" + }, + { + "style": "Text", + "text": "Insert a breakpoint (F9) at this line." + }, + { + "style": "Note", + "text": "Using \"CTRL+F\" allows us to find what we search for in the code.", + "updated": 1614265550399 + } + ] +} \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Topics/debugging-your-indicator-003-start-your-processes.json b/Projects/Superalgos/Schemas/Docs-Topics/debugging-your-indicator-003-start-your-processes.json new file mode 100644 index 000000000..0e5d9e8c8 --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Topics/debugging-your-indicator-003-start-your-processes.json @@ -0,0 +1,83 @@ +{ + "topic": "Debugging your indicator", + "pageNumber": "3", + "type": "Start your processes", + "definition": { + "text": "Start the Task in Debug mode while running a debug session in your IDE.", + "updated": 1614332155989 + }, + "paragraphs": [ + { + "style": "Text", + "text": "Start your Superalgos UI by going to the terminal and enter \"node run\".", + "updated": 1614332264940 + }, + { + "style": "Png", + "text": "PNGs/Superalgos/Docs/debugging-your-indicator/8_node-run.png" + }, + { + "style": "Text", + "text": "Start a Debug Session in your IDE by clicking \"Run -> Start Debugging\" (F5)", + "updated": 1614332454563 + }, + { + "style": "Png", + "text": "PNGs/Superalgos/Docs/debugging-your-indicator/9_start-debugging.png" + }, + { + "style": "Text", + "text": "Go to your Network node and find the Data Task for your indicator.", + "updated": 1614332492978 + }, + { + "style": "Png", + "text": "PNGs/Superalgos/Docs/debugging-your-indicator/10_network.png" + }, + { + "style": "Text", + "text": "Expand the Data Tasks and hover over the Task node for your indicator and click \"Debug\" (the Task will start up, but in Debug mode).", + "updated": 1614332581381 + }, + { + "style": "Png", + "text": "PNGs/Superalgos/Docs/debugging-your-indicator/11_expand-data-tasks.png" + }, + { + "style": "Png", + "text": "PNGs/Superalgos/Docs/debugging-your-indicator/12_debug-your-indicator-task.png", + "updated": 1614332699707 + }, + { + "style": "Png", + "text": "PNGs/Superalgos/Docs/debugging-your-indicator/13_check-your-indicator-starts.png" + }, + { + "style": "Text", + "text": "Start the needed tasks connected to your indicator (i.e. Exchange Raw Data and Candle Volumes) by hovering over the nodes and click \"Run\".", + "updated": 1614332767583 + }, + { + "style": "Png", + "text": "PNGs/Superalgos/Docs/debugging-your-indicator/15_run-ohlcvs.png" + }, + { + "style": "Png", + "text": "PNGs/Superalgos/Docs/debugging-your-indicator/16_run-dependencies.png" + }, + { + "style": "Png", + "text": "PNGs/Superalgos/Docs/debugging-your-indicator/14_check-debug-terminal.png" + }, + { + "style": "Note", + "text": "Check your Superalgos terminal to see if everything starts up as planned", + "updated": 1614333056827 + }, + { + "style": "Note", + "text": "Deleting existing data from your indicator in the..Superalgos/Data-Storage/ folder might speed up the data mining process", + "updated": 1614333417020 + } + ] +} \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Topics/debugging-your-indicator-004-let-the-hunt-begin.json b/Projects/Superalgos/Schemas/Docs-Topics/debugging-your-indicator-004-let-the-hunt-begin.json new file mode 100644 index 000000000..68411b272 --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Topics/debugging-your-indicator-004-let-the-hunt-begin.json @@ -0,0 +1,54 @@ +{ + "topic": "Debugging your indicator", + "pageNumber": "4", + "type": "Let the hunt begin!", + "definition": { + "text": "Use F11 to zoom in to the code once it stops at the breaking point, and use F5 to take it step by step forward.", + "updated": 1614333358461 + }, + "paragraphs": [ + { + "style": "Subtitle", + "text": "Ssssh, be quite... wait for it...", + "updated": 1614264973244 + }, + { + "style": "Text", + "text": "As soon as the data for your indicator is being processed, your IDE will pause the process at the break point we set earlier (eval(dataBuildingProcedure.loop.procedureJavascriptCode.code)), allowing you to zoom in to the details what's really going on." + }, + { + "style": "Text", + "text": "Keep an eye out for when your Breaking point changes from a dot to an arrow.", + "updated": 1614334261604 + }, + { + "style": "Png", + "text": "PNGs/Superalgos/Docs/debugging-your-indicator/7_breaking-point-indication.png" + }, + { + "style": "Png", + "text": "PNGs/Superalgos/Docs/debugging-your-indicator/17_stopped-at-breaking-point.png" + }, + { + "style": "Text", + "text": "Use F11 to zoom into the code and F5 to step forward." + }, + { + "style": "Text", + "text": "Keep stepping forward to follow the flow of data." + }, + { + "style": "Text", + "text": "Monitor what's going on in the code, and hover over your variables to check what values they get." + }, + { + "style": "Png", + "text": "PNGs/Superalgos/Docs/debugging-your-indicator/18_zoomed-in-getting-values.png" + }, + { + "style": "Note", + "text": "Tip: In cases where the values turn to \"NaN\" or stays \"undefined\" without a logical reason - There's a point to raise doubt", + "updated": 1614265790102 + } + ] +} \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Topics/debugging-your-indicator-005-found-something.json b/Projects/Superalgos/Schemas/Docs-Topics/debugging-your-indicator-005-found-something.json new file mode 100644 index 000000000..7ee310a4b --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Topics/debugging-your-indicator-005-found-something.json @@ -0,0 +1,21 @@ +{ + "topic": "Debugging your indicator", + "pageNumber": "5", + "type": "Found something!", + "definition": { + "text": "Rinse and repeat", + "updated": 1614333501847 + }, + "paragraphs": [ + { + "style": "Text", + "text": "When you've spotted what may be the cause of the error, stop all processes in the UI, modify the code for your indicator and re-debug your code.", + "updated": 1614265041452 + }, + { + "style": "Note", + "text": "Use \"if/else\" statements or assign values to variables that get questionable values and re-test your indicator, ruling out possible causes - one by one", + "updated": 1614333577089 + } + ] +} \ No newline at end of file