Some Icons for API Data Fetcher Bot and getContextVariables function implementation

This commit is contained in:
Luis Fernando Molina committed 2021-05-18 20:36:27 +02:00
1 parent d18f8cefd7
commit 2bccf3518c
18 files changed
+230 -119

No files matched your search

@@ -0,0 +1,8 @@
<svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M152.5 415H70C48.4609 415 31 397.539 31 376V92C31 70.4609 48.4609 53 70 53H408C429.539 53 447 70.4609 447 92V135.103" stroke="#FFD1A9" stroke-width="29" stroke-dasharray="10 10"/>
<circle cx="446.5" cy="187.5" r="46.5" fill="#FF8C29"/>
<circle cx="446.5" cy="187.5" r="31.5" fill="#F0353D"/>
<path d="M418.214 495.077C462.222 488.792 496 451.016 496 405.35C496 359.355 461.766 321.365 417.303 315.484C410.517 271.171 367.066 237 314.5 237C261.934 237 218.483 271.171 211.697 315.484C167.234 321.365 133 359.355 133 405.35C133 451.016 166.778 488.792 210.786 495.077V496H418.214V495.077Z" fill="#365558"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M315 496H418.214V495.077C462.222 488.791 496 451.016 496 405.35C496 359.355 461.766 321.365 417.303 315.484C410.538 271.311 367.341 237.217 315 237.001V496Z" fill="#0295AA"/>
<path d="M265.938 439.906H228.953L221.922 461H199.492L237.602 358.625H257.148L295.469 461H273.039L265.938 439.906ZM234.648 422.82H260.242L247.375 384.5L234.648 422.82ZM326.125 424.93V461H305.031V358.625H344.969C352.656 358.625 359.406 360.031 365.219 362.844C371.078 365.656 375.578 369.664 378.719 374.867C381.859 380.023 383.43 385.906 383.43 392.516C383.43 402.547 379.984 410.469 373.094 416.281C366.25 422.047 356.758 424.93 344.617 424.93H326.125ZM326.125 407.844H344.969C350.547 407.844 354.789 406.531 357.695 403.906C360.648 401.281 362.125 397.531 362.125 392.656C362.125 387.641 360.648 383.586 357.695 380.492C354.742 377.398 350.664 375.805 345.461 375.711H326.125V407.844ZM420.414 461H399.32V358.625H420.414V461Z" fill="#E6EAEA"/>
</svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

@@ -0,0 +1,11 @@
<svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="146.564" height="348.799" transform="matrix(0.83147 0.55557 0 1 73 13)" fill="#9BAAAB"/>
<rect width="146.564" height="348.799" transform="matrix(0.83147 0.55557 0 1 316.137 13)" fill="#9BAAAB"/>
<rect width="146.564" height="348.799" transform="matrix(-0.83147 0.55557 0 1 316.432 13)" fill="#CDD4D5"/>
<path d="M103.5 89L149.5 184" stroke="#F0353D" stroke-width="28"/>
<path d="M160.5 115L88 160" stroke="#F0353D" stroke-width="28"/>
<path d="M118 182.5C84.4995 288 224.5 486 258 212.5C299.5 57.4999 459.5 198.5 388.5 337.5" stroke="#F0353D" stroke-width="13" stroke-dasharray="10 10"/>
<path d="M418.214 495.077C462.222 488.792 496 451.016 496 405.35C496 359.355 461.766 321.365 417.303 315.484C410.517 271.171 367.066 237 314.5 237C261.934 237 218.483 271.171 211.697 315.484C167.234 321.365 133 359.355 133 405.35C133 451.016 166.778 488.792 210.786 495.077V496H418.214V495.077Z" fill="#365558"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M315 496H418.215V495.077C462.223 488.792 496 451.017 496 405.35C496 359.354 461.766 321.365 417.303 315.484C410.539 271.312 367.342 237.217 315 237.001V496Z" fill="#0295AA"/>
<path d="M265.938 439.906H228.953L221.922 461H199.492L237.602 358.625H257.148L295.469 461H273.039L265.938 439.906ZM234.648 422.82H260.242L247.375 384.5L234.648 422.82ZM326.125 424.93V461H305.031V358.625H344.969C352.656 358.625 359.406 360.031 365.219 362.844C371.078 365.656 375.578 369.664 378.719 374.867C381.859 380.023 383.43 385.906 383.43 392.516C383.43 402.547 379.984 410.469 373.094 416.281C366.25 422.047 356.758 424.93 344.617 424.93H326.125ZM326.125 407.844H344.969C350.547 407.844 354.789 406.531 357.695 403.906C360.648 401.281 362.125 397.531 362.125 392.656C362.125 387.641 360.648 383.586 357.695 380.492C354.742 377.398 350.664 375.805 345.461 375.711H326.125V407.844ZM420.414 461H399.32V358.625H420.414V461Z" fill="#E6EAEA"/>
</svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

@@ -0,0 +1,13 @@
<svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M418.214 495.077C462.222 488.792 496 451.016 496 405.35C496 359.355 461.766 321.365 417.303 315.484C410.517 271.171 367.066 237 314.5 237C261.934 237 218.483 271.171 211.697 315.484C167.234 321.365 133 359.355 133 405.35C133 451.016 166.778 488.792 210.786 495.077V496H418.214V495.077Z" fill="#365558"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M315 496H418.214V495.077C462.222 488.791 496 451.016 496 405.35C496 359.355 461.766 321.365 417.303 315.484C410.538 271.311 367.341 237.217 315 237.001V496Z" fill="#0295AA"/>
<path d="M265.938 439.906H228.953L221.922 461H199.492L237.602 358.625H257.148L295.469 461H273.039L265.938 439.906ZM234.648 422.82H260.242L247.375 384.5L234.648 422.82ZM326.125 424.93V461H305.031V358.625H344.969C352.656 358.625 359.406 360.031 365.219 362.844C371.078 365.656 375.578 369.664 378.719 374.867C381.859 380.023 383.43 385.906 383.43 392.516C383.43 402.547 379.984 410.469 373.094 416.281C366.25 422.047 356.758 424.93 344.617 424.93H326.125ZM326.125 407.844H344.969C350.547 407.844 354.789 406.531 357.695 403.906C360.648 401.281 362.125 397.531 362.125 392.656C362.125 387.641 360.648 383.586 357.695 380.492C354.742 377.398 350.664 375.805 345.461 375.711H326.125V407.844ZM420.414 461H399.32V358.625H420.414V461Z" fill="#E6EAEA"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M41 429L41 95L76 95L76 429L41 429Z" fill="#FD6A33"/>
<circle cx="58.5" cy="55.5" r="46.5" fill="#F0353D"/>
<circle cx="58.5" cy="449.5" r="46.5" fill="#FF8C29"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M167 187.535H95.4585C84.9141 187.535 76.3662 196.125 76.3662 206.721H42C42 177.051 65.9342 153 95.4585 153H167V187.535Z" fill="#FD6A33"/>
<path d="M170 84V198H496V84H170Z" fill="#9BAAAB"/>
<rect x="170" y="201" width="326" height="15" fill="#E6EAEA"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M251.627 60.8829H233V45H251.627C267.849 45 281 58.2524 281 74.6V163.4C281 179.748 267.849 193 251.627 193H233V177.117H251.627C259.145 177.117 265.239 170.976 265.239 163.4V74.6C265.239 67.0243 259.145 60.8829 251.627 60.8829Z" fill="#E6EAEA"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M294.373 60.8829H313V45H294.373C278.151 45 265 58.2524 265 74.6V163.4C265 179.748 278.151 193 294.373 193H313V177.117H294.373C286.855 177.117 280.761 170.976 280.761 163.4V74.6C280.761 67.0243 286.855 60.8829 294.373 60.8829Z" fill="#E6EAEA"/>
</svg>

After

Width:  |  Height:  |  Size: 2.4 KiB

@@ -0,0 +1,18 @@
<svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M418.214 495.077C462.222 488.792 496 451.016 496 405.35C496 359.355 461.766 321.365 417.303 315.484C410.517 271.171 367.066 237 314.5 237C261.934 237 218.483 271.171 211.697 315.484C167.234 321.365 133 359.355 133 405.35C133 451.016 166.778 488.792 210.786 495.077V496H418.214V495.077Z" fill="#365558"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M315 496H418.214V495.077C462.222 488.791 496 451.016 496 405.35C496 359.355 461.766 321.365 417.303 315.484C410.538 271.311 367.341 237.217 315 237.001V496Z" fill="#0295AA"/>
<path d="M265.938 439.906H228.953L221.922 461H199.492L237.602 358.625H257.148L295.469 461H273.039L265.938 439.906ZM234.648 422.82H260.242L247.375 384.5L234.648 422.82ZM326.125 424.93V461H305.031V358.625H344.969C352.656 358.625 359.406 360.031 365.219 362.844C371.078 365.656 375.578 369.664 378.719 374.867C381.859 380.023 383.43 385.906 383.43 392.516C383.43 402.547 379.984 410.469 373.094 416.281C366.25 422.047 356.758 424.93 344.617 424.93H326.125ZM326.125 407.844H344.969C350.547 407.844 354.789 406.531 357.695 403.906C360.648 401.281 362.125 397.531 362.125 392.656C362.125 387.641 360.648 383.586 357.695 380.492C354.742 377.398 350.664 375.805 345.461 375.711H326.125V407.844ZM420.414 461H399.32V358.625H420.414V461Z" fill="#E6EAEA"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M41 429L41 95L76 95L76 429L41 429Z" fill="#0295AA"/>
<circle cx="58.5" cy="55.5" r="46.5" fill="#4ACFD9"/>
<circle cx="58.5" cy="449.5" r="46.5" fill="#365558"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M167 141.535H95.4585C84.9141 141.535 76.3662 150.125 76.3662 160.721H42C42 131.051 65.9342 107 95.4585 107H167V141.535Z" fill="#0295AA"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M167 277.535H95.4585C84.9141 277.535 76.3662 286.125 76.3662 296.721H42C42 267.051 65.9342 243 95.4585 243H167V277.535Z" fill="#0295AA"/>
<path d="M179 56V134H496V56H179Z" fill="#9BAAAB"/>
<path d="M179 192V270H496V192H179Z" fill="#9BAAAB"/>
<rect x="179" y="136" width="317" height="10" fill="#E6EAEA"/>
<rect x="179" y="272" width="317" height="10" fill="#E6EAEA"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M234.806 39.839H222V29H234.806C245.959 29 255 38.0438 255 49.2V109.8C255 120.956 245.959 130 234.806 130H222V119.161H234.806C239.974 119.161 244.164 114.97 244.164 109.8V49.2C244.164 44.0301 239.974 39.839 234.806 39.839Z" fill="#E6EAEA"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M234.806 175.839H222V165H234.806C245.959 165 255 174.044 255 185.2V245.8C255 256.956 245.959 266 234.806 266H222V255.161H234.806C239.974 255.161 244.164 250.97 244.164 245.8V185.2C244.164 180.03 239.974 175.839 234.806 175.839Z" fill="#E6EAEA"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M264.194 39.839H277V29H264.194C253.041 29 244 38.0438 244 49.2V109.8C244 120.956 253.041 130 264.194 130H277V119.161H264.194C259.026 119.161 254.836 114.97 254.836 109.8V49.2C254.836 44.0301 259.026 39.839 264.194 39.839Z" fill="#E6EAEA"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M264.194 175.839H277V165H264.194C253.041 165 244 174.044 244 185.2V245.8C244 256.956 253.041 266 264.194 266H277V255.161H264.194C259.026 255.161 254.836 250.97 254.836 245.8V185.2C254.836 180.03 259.026 175.839 264.194 175.839Z" fill="#E6EAEA"/>
</svg>

After

Width:  |  Height:  |  Size: 3.3 KiB

@@ -0,0 +1,7 @@
<svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M418.214 495.077C462.222 488.792 496 451.016 496 405.35C496 359.355 461.766 321.365 417.303 315.484C410.517 271.171 367.066 237 314.5 237C261.934 237 218.483 271.171 211.697 315.484C167.234 321.365 133 359.355 133 405.35C133 451.016 166.778 488.792 210.786 495.077V496H418.214V495.077Z" fill="#365558"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M315 496H418.214V495.077C462.222 488.791 496 451.016 496 405.35C496 359.355 461.766 321.365 417.303 315.484C410.538 271.311 367.341 237.217 315 237.001V496Z" fill="#0295AA"/>
<path d="M265.938 439.906H228.953L221.922 461H199.492L237.602 358.625H257.148L295.469 461H273.039L265.938 439.906ZM234.648 422.82H260.242L247.375 384.5L234.648 422.82ZM326.125 424.93V461H305.031V358.625H344.969C352.656 358.625 359.406 360.031 365.219 362.844C371.078 365.656 375.578 369.664 378.719 374.867C381.859 380.023 383.43 385.906 383.43 392.516C383.43 402.547 379.984 410.469 373.094 416.281C366.25 422.047 356.758 424.93 344.617 424.93H326.125ZM326.125 407.844H344.969C350.547 407.844 354.789 406.531 357.695 403.906C360.648 401.281 362.125 397.531 362.125 392.656C362.125 387.641 360.648 383.586 357.695 380.492C354.742 377.398 350.664 375.805 345.461 375.711H326.125V407.844ZM420.414 461H399.32V358.625H420.414V461Z" fill="#E6EAEA"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M85 111L427 111L427 146L85 146L85 111Z" fill="#E6EAEA"/>
<circle cx="85" cy="129" r="40" fill="#BCD643"/>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

@@ -0,0 +1,11 @@
<svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M418.214 495.077C462.222 488.792 496 451.016 496 405.35C496 359.355 461.766 321.365 417.303 315.484C410.517 271.171 367.066 237 314.5 237C261.934 237 218.483 271.171 211.697 315.484C167.234 321.365 133 359.355 133 405.35C133 451.016 166.778 488.792 210.786 495.077V496H418.214V495.077Z" fill="#365558"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M315 496H418.214V495.077C462.222 488.791 496 451.016 496 405.35C496 359.355 461.766 321.365 417.303 315.484C410.538 271.311 367.341 237.217 315 237.001V496Z" fill="#0295AA"/>
<path d="M265.938 439.906H228.953L221.922 461H199.492L237.602 358.625H257.148L295.469 461H273.039L265.938 439.906ZM234.648 422.82H260.242L247.375 384.5L234.648 422.82ZM326.125 424.93V461H305.031V358.625H344.969C352.656 358.625 359.406 360.031 365.219 362.844C371.078 365.656 375.578 369.664 378.719 374.867C381.859 380.023 383.43 385.906 383.43 392.516C383.43 402.547 379.984 410.469 373.094 416.281C366.25 422.047 356.758 424.93 344.617 424.93H326.125ZM326.125 407.844H344.969C350.547 407.844 354.789 406.531 357.695 403.906C360.648 401.281 362.125 397.531 362.125 392.656C362.125 387.641 360.648 383.586 357.695 380.492C354.742 377.398 350.664 375.805 345.461 375.711H326.125V407.844ZM420.414 461H399.32V358.625H420.414V461Z" fill="#E6EAEA"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M85 49L427 49L427 84L85 84L85 49Z" fill="#CDD4D5"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M85 114L427 114L427 149L85 149L85 114Z" fill="#CDD4D5"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M85 179L427 179L427 214L85 214L85 179Z" fill="#CDD4D5"/>
<circle cx="85" cy="60" r="40" fill="#0295AA"/>
<circle cx="256" cy="132" r="40" fill="#0295AA"/>
<circle cx="427" cy="197" r="40" fill="#0295AA"/>
</svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

@@ -0,0 +1,10 @@
<svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M152.569 269C134.693 269 118.436 279.356 110.88 295.556L108.335 301.014C102.416 282.447 85.0284 269 64.4999 269H45C33.402 269 24 259.598 24 248V53C24 41.402 33.402 32 45 32H466.5C478.098 32 487.5 41.402 487.5 53V248C487.5 259.598 478.098 269 466.5 269H152.569Z" stroke="#9BAAAB" stroke-width="26"/>
<path d="M418.214 495.077C462.222 488.792 496 451.016 496 405.35C496 359.355 461.766 321.365 417.303 315.484C410.517 271.171 367.066 237 314.5 237C261.934 237 218.483 271.171 211.697 315.484C167.234 321.365 133 359.355 133 405.35C133 451.016 166.778 488.792 210.786 495.077V496H418.214V495.077Z" fill="#365558"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M315 496H418.214V495.077C462.222 488.791 496 451.016 496 405.35C496 359.355 461.766 321.365 417.303 315.484C410.538 271.311 367.341 237.217 315 237.001V496Z" fill="#0295AA"/>
<path d="M265.938 439.906H228.953L221.922 461H199.492L237.602 358.625H257.148L295.469 461H273.039L265.938 439.906ZM234.648 422.82H260.242L247.375 384.5L234.648 422.82ZM326.125 424.93V461H305.031V358.625H344.969C352.656 358.625 359.406 360.031 365.219 362.844C371.078 365.656 375.578 369.664 378.719 374.867C381.859 380.023 383.43 385.906 383.43 392.516C383.43 402.547 379.984 410.469 373.094 416.281C366.25 422.047 356.758 424.93 344.617 424.93H326.125ZM326.125 407.844H344.969C350.547 407.844 354.789 406.531 357.695 403.906C360.648 401.281 362.125 397.531 362.125 392.656C362.125 387.641 360.648 383.586 357.695 380.492C354.742 377.398 350.664 375.805 345.461 375.711H326.125V407.844ZM420.414 461H399.32V358.625H420.414V461Z" fill="#E6EAEA"/>
<path d="M228 188L285 188C302.673 188 317 173.673 317 156V156C317 138.327 302.673 124 285 124L228 124" stroke="#9BAAAB" stroke-width="22"/>
<path d="M193 124L240.25 88.493L240.25 159.507L193 124Z" fill="#F0353D"/>
<circle cx="263" cy="148" r="111" stroke="#FF8C29" stroke-width="28"/>
<rect x="329" y="237.188" width="23" height="109.835" transform="rotate(-44.7351 329 237.188)" fill="#FF8C29"/>
</svg>

After

Width:  |  Height:  |  Size: 2.0 KiB

@@ -0,0 +1,10 @@
<svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M283 176V184.058C283 223.688 251.031 255.814 211.595 255.814H92.4585C81.9141 255.814 73.3662 264.404 73.3662 275H39C39 245.331 62.9342 221.279 92.4585 221.279H211.595C232.051 221.279 248.634 204.615 248.634 184.058V176H283Z" fill="#BCD643"/>
<ellipse cx="265.5" cy="151" rx="46.5" ry="47" fill="#4ACFD9"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M38 326L38 69L73 69L73 326L38 326Z" fill="#FD6A33"/>
<circle cx="55.5" cy="57.5" r="46.5" fill="#F0353D"/>
<circle cx="55.5" cy="339.5" r="46.5" fill="#FF8C29"/>
<path d="M418.214 495.077C462.222 488.792 496 451.016 496 405.35C496 359.355 461.766 321.365 417.303 315.484C410.517 271.171 367.066 237 314.5 237C261.934 237 218.483 271.171 211.697 315.484C167.234 321.365 133 359.355 133 405.35C133 451.016 166.778 488.792 210.786 495.077V496H418.214V495.077Z" fill="#365558"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M315 496H418.214V495.077C462.222 488.791 496 451.016 496 405.35C496 359.355 461.766 321.365 417.303 315.484C410.538 271.311 367.341 237.217 315 237.001V496Z" fill="#0295AA"/>
<path d="M265.938 439.906H228.953L221.922 461H199.492L237.602 358.625H257.148L295.469 461H273.039L265.938 439.906ZM234.648 422.82H260.242L247.375 384.5L234.648 422.82ZM326.125 424.93V461H305.031V358.625H344.969C352.656 358.625 359.406 360.031 365.219 362.844C371.078 365.656 375.578 369.664 378.719 374.867C381.859 380.023 383.43 385.906 383.43 392.516C383.43 402.547 379.984 410.469 373.094 416.281C366.25 422.047 356.758 424.93 344.617 424.93H326.125ZM326.125 407.844H344.969C350.547 407.844 354.789 406.531 357.695 403.906C360.648 401.281 362.125 397.531 362.125 392.656C362.125 387.641 360.648 383.586 357.695 380.492C354.742 377.398 350.664 375.805 345.461 375.711H326.125V407.844ZM420.414 461H399.32V358.625H420.414V461Z" fill="#E6EAEA"/>
</svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

@@ -70,124 +70,132 @@ exports.newSuperalgosBotModulesFromOneMinToMultiPeriodMarket = function (process
function getContextVariables() {
try {
let thisReport;
let reportKey;
let statusReport;
let thisReport
let reportKey
let statusReport
/* We look first for Exchange Raw Data in order to get when the market starts. */
reportKey = "Masters" + "-" + "Exchange-Raw-Data" + "-" + "Historic-OHLCVs"
TS.projects.superalgos.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
"[INFO] start -> getContextVariables -> reportKey = " + reportKey)
detectWhereTheMarketBegins()
detectWhereTheMarketBegins()
getOwnStatusReport()
statusReport = statusDependencies.statusReports.get(reportKey);
function detectWhereTheMarketBegins() {
/*
We look first for Status Report that will tell us when the market starts.
*/
statusReport = statusDependencies.reportsByMainUtility.get('Market Starting Point');
if (statusReport === undefined) { // This means the status report does not exist, that could happen for instance at the begining of a month.
TS.projects.superalgos.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
"[WARN] start -> getContextVariables -> Status Report does not exist. Retrying Later. ");
callBackFunction(TS.projects.superalgos.globals.standardResponses.DEFAULT_RETRY_RESPONSE);
return
}
if (statusReport.status === "Status Report is corrupt.") {
TS.projects.superalgos.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
"[ERROR] start -> getContextVariables -> Can not continue because dependecy Status Report is corrupt. ");
callBackFunction(TS.projects.superalgos.globals.standardResponses.DEFAULT_RETRY_RESPONSE);
return
}
thisReport = statusDependencies.statusReports.get(reportKey).file;
if (thisReport.beginingOfMarket === undefined) {
TS.projects.superalgos.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
"[WARN] start -> getContextVariables -> Undefined Last File. -> reportKey = " + reportKey);
TS.projects.superalgos.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
"[HINT] start -> getContextVariables -> It is too early too run this process since the trade history of the market is not there yet.");
let customOK = {
result: TS.projects.superalgos.globals.standardResponses.CUSTOM_OK_RESPONSE.result,
message: "Dependency does not exist."
if (statusReport === undefined) { // This means the status report does not exist, that could happen for instance at the begining of a month.
TS.projects.superalgos.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
"[WARN] start -> getContextVariables -> Status Report does not exist. Retrying Later. ");
callBackFunction(TS.projects.superalgos.globals.standardResponses.DEFAULT_RETRY_RESPONSE);
return
}
TS.projects.superalgos.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
"[WARN] start -> getContextVariables -> customOK = " + customOK.message);
callBackFunction(customOK)
return
}
contextVariables.datetimeBeginingOfMarketFile = new Date(
thisReport.beginingOfMarket.year + "-" +
thisReport.beginingOfMarket.month + "-" +
thisReport.beginingOfMarket.days + " " +
thisReport.beginingOfMarket.hours + ":" +
thisReport.beginingOfMarket.minutes +
TS.projects.superalgos.globals.timeConstants.GMT_SECONDS);
/* Second, we get the report from Exchange Raw Data, to know when the marted ends. */
reportKey = "Masters" + "-" + "Exchange-Raw-Data" + "-" + "Historic-OHLCVs"
TS.projects.superalgos.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
"[INFO] start -> getContextVariables -> reportKey = " + reportKey)
statusReport = statusDependencies.statusReports.get(reportKey);
if (statusReport === undefined) { // This means the status report does not exist, that could happen for instance at the begining of a month.
TS.projects.superalgos.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
"[WARN] start -> getContextVariables -> Status Report does not exist. Retrying Later. ");
callBackFunction(TS.projects.superalgos.globals.standardResponses.DEFAULT_RETRY_RESPONSE);
return;
}
if (statusReport.status === "Status Report is corrupt.") {
TS.projects.superalgos.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
"[ERROR] start -> getContextVariables -> Can not continue because dependecy Status Report is corrupt. ");
callBackFunction(TS.projects.superalgos.globals.standardResponses.DEFAULT_RETRY_RESPONSE);
return;
}
thisReport = statusDependencies.statusReports.get(reportKey).file;
if (thisReport.lastFile === undefined) {
TS.projects.superalgos.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
"[WARN] start -> getContextVariables -> Undefined Last File. -> reportKey = " + reportKey);
let customOK = {
result: TS.projects.superalgos.globals.standardResponses.CUSTOM_OK_RESPONSE.result,
message: "Dependency not ready."
if (statusReport.status === "Status Report is corrupt.") {
TS.projects.superalgos.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
"[ERROR] start -> getContextVariables -> Can not continue because dependecy Status Report is corrupt. ");
callBackFunction(TS.projects.superalgos.globals.standardResponses.DEFAULT_RETRY_RESPONSE);
return
}
TS.projects.superalgos.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
"[WARN] start -> getContextVariables -> customOK = " + customOK.message);
callBackFunction(customOK);
return;
thisReport = statusDependencies.statusReports.get(reportKey).file;
if (thisReport.beginingOfMarket === undefined) {
TS.projects.superalgos.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
"[WARN] start -> getContextVariables -> Undefined Last File. -> reportKey = " + reportKey);
TS.projects.superalgos.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
"[HINT] start -> getContextVariables -> It is too early too run this process since the trade history of the market is not there yet.");
let customOK = {
result: TS.projects.superalgos.globals.standardResponses.CUSTOM_OK_RESPONSE.result,
message: "Dependency does not exist."
}
TS.projects.superalgos.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
"[WARN] start -> getContextVariables -> customOK = " + customOK.message);
callBackFunction(customOK)
return
}
contextVariables.datetimeBeginingOfMarketFile = new Date(
thisReport.beginingOfMarket.year + "-" +
thisReport.beginingOfMarket.month + "-" +
thisReport.beginingOfMarket.days + " " +
thisReport.beginingOfMarket.hours + ":" +
thisReport.beginingOfMarket.minutes +
TS.projects.superalgos.globals.timeConstants.GMT_SECONDS)
}
contextVariables.datetimeLastAvailableDependencyFile = new Date(
thisReport.lastFile.year + "-" +
thisReport.lastFile.month + "-" +
thisReport.lastFile.days + " " + "00:00" +
TS.projects.superalgos.globals.timeConstants.GMT_SECONDS);
function detectWhereTheMarketBegins() {
/*
Second, we get the report from Exchange Raw Data, to know when the marted ends.
*/
statusReport = statusDependencies.reportsByMainUtility.get('Market Ending Point')
/* Finally we get our own Status Report. */
reportKey = "Masters" + "-" + "Candles-Volumes" + "-" + "Multi-Period-Market"
TS.projects.superalgos.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
"[INFO] start -> getContextVariables -> reportKey = " + reportKey)
if (statusReport === undefined) { // This means the status report does not exist, that could happen for instance at the begining of a month.
TS.projects.superalgos.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
"[WARN] start -> getContextVariables -> Status Report does not exist. Retrying Later. ");
callBackFunction(TS.projects.superalgos.globals.standardResponses.DEFAULT_RETRY_RESPONSE);
return;
}
statusReport = statusDependencies.statusReports.get(reportKey);
if (statusReport.status === "Status Report is corrupt.") {
TS.projects.superalgos.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
"[ERROR] start -> getContextVariables -> Can not continue because dependecy Status Report is corrupt. ");
callBackFunction(TS.projects.superalgos.globals.standardResponses.DEFAULT_RETRY_RESPONSE);
return;
}
if (statusReport === undefined) { // This means the status report does not exist, that could happen for instance at the begining of a month.
TS.projects.superalgos.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
"[WARN] start -> getContextVariables -> Status Report does not exist. Retrying Later. ");
callBackFunction(TS.projects.superalgos.globals.standardResponses.DEFAULT_RETRY_RESPONSE);
return
thisReport = statusDependencies.statusReports.get(reportKey).file;
if (thisReport.lastFile === undefined) {
TS.projects.superalgos.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
"[WARN] start -> getContextVariables -> Undefined Last File. -> reportKey = " + reportKey);
let customOK = {
result: TS.projects.superalgos.globals.standardResponses.CUSTOM_OK_RESPONSE.result,
message: "Dependency not ready."
}
TS.projects.superalgos.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
"[WARN] start -> getContextVariables -> customOK = " + customOK.message);
callBackFunction(customOK);
return;
}
contextVariables.datetimeLastAvailableDependencyFile = new Date(
thisReport.lastFile.year + "-" +
thisReport.lastFile.month + "-" +
thisReport.lastFile.days + " " + "00:00" +
TS.projects.superalgos.globals.timeConstants.GMT_SECONDS)
}
if (statusReport.status === "Status Report is corrupt.") {
TS.projects.superalgos.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
"[ERROR] start -> getContextVariables -> Can not continue because self dependecy Status Report is corrupt. Aborting Process.");
callBackFunction(TS.projects.superalgos.globals.standardResponses.DEFAULT_FAIL_RESPONSE);
return
}
function getOwnStatusReport() {
/*
Finally we get our own Status Report.
*/
statusReport = statusDependencies.reportsByMainUtility.get('Self Reference')
thisReport = statusDependencies.statusReports.get(reportKey).file;
if (statusReport === undefined) { // This means the status report does not exist, that could happen for instance at the begining of a month.
TS.projects.superalgos.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
"[WARN] start -> getContextVariables -> Status Report does not exist. Retrying Later. ");
callBackFunction(TS.projects.superalgos.globals.standardResponses.DEFAULT_RETRY_RESPONSE);
return
}
if (statusReport.status === "Status Report is corrupt.") {
TS.projects.superalgos.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
"[ERROR] start -> getContextVariables -> Can not continue because self dependecy Status Report is corrupt. Aborting Process.");
callBackFunction(TS.projects.superalgos.globals.standardResponses.DEFAULT_FAIL_RESPONSE);
return
}
thisReport = statusDependencies.statusReports.get(reportKey).file
}
if (thisReport.lastFile !== undefined) {
/*
We get in here when the report already exists, meaning that this process
has succesfully ran before at least once.
*/
TS.projects.superalgos.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
"[INFO] start -> getContextVariables -> Process Running not for the very first time. -> reportKey = " + reportKey);
@@ -225,9 +233,13 @@ exports.newSuperalgosBotModulesFromOneMinToMultiPeriodMarket = function (process
*/
contextVariables.datetimeLastProducedFile = new Date(contextVariables.datetimeLastProducedFile.valueOf() - TS.projects.superalgos.globals.timeConstants.ONE_DAY_IN_MILISECONDS);
findPreviousContent()
loadExistingFiles()
return
} else {
/*
We get in here when the report does not exist, meaning that this process
has never ran succesfully before at least once.
*/
TS.projects.superalgos.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
"[INFO] start -> getContextVariables -> Process Running for the very first time. -> reportKey = " + reportKey);
@@ -265,7 +277,7 @@ exports.newSuperalgosBotModulesFromOneMinToMultiPeriodMarket = function (process
}
}
function findPreviousContent() {
function loadExistingFiles() {
/*
This is where we read the current files we have produced at previous runs
of this same process. We just read all the content and organize it
@@ -281,7 +293,7 @@ exports.newSuperalgosBotModulesFromOneMinToMultiPeriodMarket = function (process
function loopBody() {
let timeFrame = TS.projects.superalgos.globals.timeFrames.marketFilesPeriods()[n][1];
TS.projects.superalgos.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
"[INFO] start -> findPreviousContent -> loopBody -> timeFrame = " + timeFrame)
"[INFO] start -> loadExistingFiles -> loopBody -> timeFrame = " + timeFrame)
let previousElements
@@ -300,7 +312,7 @@ exports.newSuperalgosBotModulesFromOneMinToMultiPeriodMarket = function (process
fileStorage.getTextFile(filePath, onFileReceived);
TS.projects.superalgos.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
"[INFO] start -> findPreviousContent -> loopBody -> getCandles -> getting file.");
"[INFO] start -> loadExistingFiles -> loopBody -> getCandles -> getting file.");
function onFileReceived(err, text) {
let dailyFile
@@ -315,18 +327,18 @@ exports.newSuperalgosBotModulesFromOneMinToMultiPeriodMarket = function (process
} catch (err) {
TS.projects.superalgos.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
"[ERROR] start -> findPreviousContent -> loopBody -> getCandles -> onFileReceived -> fileName = " + fileName);
"[ERROR] start -> loadExistingFiles -> loopBody -> getCandles -> onFileReceived -> fileName = " + fileName);
TS.projects.superalgos.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
"[ERROR] start -> findPreviousContent -> loopBody -> getCandles -> onFileReceived -> filePath = " + filePath);
"[ERROR] start -> loadExistingFiles -> loopBody -> getCandles -> onFileReceived -> filePath = " + filePath);
TS.projects.superalgos.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
"[ERROR] start -> findPreviousContent -> loopBody -> getCandles -> onFileReceived -> err = " + err.stack);
"[ERROR] start -> loadExistingFiles -> loopBody -> getCandles -> onFileReceived -> err = " + err.stack);
TS.projects.superalgos.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
"[ERROR] start -> findPreviousContent -> loopBody -> getCandles -> onFileReceived -> Asuming this is a temporary situation. Requesting a Retry.");
"[ERROR] start -> loadExistingFiles -> loopBody -> getCandles -> onFileReceived -> Asuming this is a temporary situation. Requesting a Retry.");
callBackFunction(TS.projects.superalgos.globals.standardResponses.DEFAULT_RETRY_RESPONSE);
}
} else {
TS.projects.superalgos.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
"[ERROR] start -> findPreviousContent -> loopBody -> getCandles -> onFileReceived -> err = " + err.stack);
"[ERROR] start -> loadExistingFiles -> loopBody -> getCandles -> onFileReceived -> err = " + err.stack);
callBackFunction(err);
}
}
@@ -345,7 +357,7 @@ exports.newSuperalgosBotModulesFromOneMinToMultiPeriodMarket = function (process
catch (err) {
TS.projects.superalgos.globals.processVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).UNEXPECTED_ERROR = err
TS.projects.superalgos.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
"[ERROR] start -> findPreviousContent -> err = " + err.stack);
"[ERROR] start -> loadExistingFiles -> err = " + err.stack);
callBackFunction(TS.projects.superalgos.globals.standardResponses.DEFAULT_FAIL_RESPONSE);
}
}
@@ -1,5 +1,9 @@
exports.newSuperalgosBotModulesIndicatorOutput = function (processIndex) {
const MODULE_NAME = "Indicator Bot";
/*
This module coordinates the actions to be taken to generate an indicator output.
It is used from both Multi-Period-Market and Multi-Period-Daily frameworks.
*/
const MODULE_NAME = "Indicator Output";
let thisObject = {
initialize: initialize,
@@ -20,13 +24,20 @@
} catch (err) {
TS.projects.superalgos.globals.processVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).UNEXPECTED_ERROR = err
TS.projects.superalgos.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
TS.projects.superalgos.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
"[ERROR] initialize -> err = " + err.stack);
callBackFunction(TS.projects.superalgos.globals.standardResponses.DEFAULT_FAIL_RESPONSE);
}
}
function start(dataFiles, timeFrame, timeFrameLabel, currentDay, interExecutionMemory, callBackFunction) {
function start(
dataFiles,
timeFrame,
timeFrameLabel,
currentDay,
interExecutionMemory,
callBackFunction
) {
try {
@@ -43,13 +54,13 @@
/* The first phase here is about checking that we have everything we need at the definition level. */
let dataDependencies = TS.projects.superalgos.utilities.nodeFunctions.nodeBranchToArray(
TS.projects.superalgos.globals.taskConstants.TASK_NODE.bot.processes[processIndex].referenceParent.processDependencies, 'Data Dependency'
)
)
if (TS.projects.superalgos.functionLibraries.singleMarketFunctions.validateDataDependencies(processIndex, dataDependencies, callBackFunction) !== true) { return }
let outputDatasets = TS.projects.superalgos.utilities.nodeFunctions.nodeBranchToArray (
let outputDatasets = TS.projects.superalgos.utilities.nodeFunctions.nodeBranchToArray(
TS.projects.superalgos.globals.taskConstants.TASK_NODE.bot.processes[processIndex].referenceParent.processOutput, 'Output Dataset'
)
)
if (TS.projects.superalgos.functionLibraries.singleMarketFunctions.validateOutputDatasets(processIndex, outputDatasets, callBackFunction) !== true) { return }
/* The second phase is about transforming the inputs into a format that can be used to apply the user defined code. */
@@ -82,7 +93,7 @@
}
/* Build the data */
jsonData = TS.projects.superalgos.functionLibraries.singleMarketFunctions.dataBuildingProcedure(processIndex,
jsonData = TS.projects.superalgos.functionLibraries.singleMarketFunctions.dataBuildingProcedure(processIndex,
products,
mainDependency,
recordDefinition,