As of version 5.7.9.9 beta, there is a new place to run your scripts from.
Until now, we had to run scripts from the chart update window, hot button, hot key or an alert window.
Now there is a new menu Scripts in the Hot Key/Script section
There are 3 sections in this setting
Desktop Load Script
This is obvious, it will get loaded on the desktop load. This place is to be used to define or reset our variables. When we use chart update script with variables that have not been defined, it generates errors about non-existing variable into the log files which clogs the system, and you can feel hiccups in the mouse cursor movement.
Therefore, define all the variables that are being logically tested in your chart update scripts.
Desktop Unload Script
This section is least important and is supposed to be used for cleaning up stuff. You can put
DelVar("*");
to delete all the variables before desktop unload
Timer Event Script
After you enable this Timer Event Script, the script in the field will be running every second. This is a great place for our variable checks, which we want to do despite the chart update. The chart update script I used in the previous post can be replaced with this functionality, as I might not need to load all the objects and redefine them with every price change. This is useful for variables that read the account object or montage window object.
You can easily enable or disable it with the checkbox, so that is another handy feature which is not available in the chart update script. Also, when you have a dead (endless) loop in your syntax, this script will be automatically disabled
This function allows us to do endless loops as well, so the limits of 200 loops in the while() function can be overridden here with the limit of 1-second timer, but theoretically we can scan the whole market list to scan for our patterns. It will just take 1 second per symbol, which still could be valuable for swing traders as we can test 900 stocks in 15 minutes, which was not possible before.
I will utilize this Timer Event Script window in my future scripts so stay tuned for more content.
Alert Window Script
This is a place where you can specify desired event conditions and call a script (a hotkey directly from the Alert window
valuable new info on DAS advanced hotkeys thanks for sharing!
awesome!