I'm not sure if the following would help, but it's worth a shot.
Using FreeBasic, I created a simple .dll that allows you to send commands to the Windows command shell. I then created an EasyLanguage function that allows you to pass a string to this .dll which represents the full command you want the shell to execute. The EasyLanguage function I created is called "callShell".
So, for example, if you wanted to display a text document listing all the reasons you shouldn't short AAPL when its RSI hits 80 or higher, you would use the following line of EasyLanguage code (let's imagine that these reasons are contained in a file called "c:\AppleReasons.txt"):
Code: Select all
If RSI(C,13) >= 80 Then value1 = callShell("NotePad.exe c:\AppleReasons.txt");
The term "value1" in the code above is simply a throw-away variable that isn't used for anything, but is used as part of the coding convention for calling functions in EasyLanguage. Otherwise, that's all there is to it.
Attached is a .zip file that contains the following files:
1) "callShellExt.dll" - This is the .dll. This should be saved at your c:\ drive level (i.e., as "c:\callShellExt.dll"). The EasyLanguage function references this specific file location. If, for some reason, you wanted to save the .dll somewhere else, make sure to change the file reference in the EasyLanguage function below.
2) "ShellELFiles.pla" - These are two EasyLanguage files, the first being the function ("callShell") and the second being an indicator ("ShellTest") which tests the function.
3) "ConsoleTest.exe" - This is a simple Windows console application that I wrote which will receive parameters from the shell and list them when it is run (hit ENTER to close this program). It should be saved as "c:\ConsoleTest.exe" - again, you don't need this program to actually use the function; it's supplied simply for debugging purposes so you can test your code to make sure it is calling the function correctly.
4) "callShellExt.bas" - This is the FreeBasic code that was used to create the .dll. You don't need this to actually run the function, but I thought you might like to see how things work 'under the hood'.
NOTE: Because you're futzing with the shell and passing information to external programs, there's always the chance something could go wrong.
I strongly recommend that you experiment with this function during off-market hours so you can make sure it works the way you want. As I was debugging this program (which, admittedly, is very simple), I crashed MultiCharts several times. I believe it works correctly now (I ran several tests and it worked fine) but I don't guarantee it. Use it at your own risk.
Also, note that the Windows command shell is very powerful, and can be called to do horrible things like format disks and delete files. Again, use at your own risk.
Good luck and let me know if this works.