Automating your Self-Contained System
This guide explains the steps to completely automate data download, signal creation, and signal processing.
The following guides may be helpful: Requirements:
Make sure you can run any necessary signal generating and data downloading programs as command line executables (that will terminate).
It is not necessary that your software is a command line exe, but it makes it easier to work with in general.
The next thing you want to do is make sure your software can write signals (or a screener) to a file in the format specified in the guides.
The directory that your strategy will read signal files from is located on the bottom right of your screen. Go ahead and modify your software so that it will write files to that directory.
Note that APM can run other programs with command line arguments, meaning that you can take in the file directory as an argument rather than hard-coding it.
Setting up your APM Strategy
We will be using the External Program section of the strategy settings to run your programs. First enable Use External Program.
The File and Arguments fields are used to specify the program you would like to run.
To schedule your program, put a cron string in the Run External Program field (refer to the cron guide).
If there is more than one program you need to run (i.e. one program to download data and one to generate the signals), then you have two options:
Note that if DownloadData.exe is not a command line executable, then the system may not wait for DownloadData.exe to finish before generating signals.
In that case, you will want to try something like:
It is highly recommended that you test that your external program work as expected by manually running them (press the button beside Run External Program) and checking that your signals were generated in the correct folder.
Once you have set up your external program to run, you can set up the other fields in the strategy settings as usual (make sure to use Local File or File Screener as your signal provider).
Then you should check that the signals are correctly processed by pressing Order Preview.
This guide explains the steps to completely automate data download, signal creation, and signal processing.
The following guides may be helpful: Requirements:
- You have software that can create signals (and download the necessary data) at your disposal
- Enough computer/programming skills to tell your software how to format the signals and where to place them on your computer
Make sure you can run any necessary signal generating and data downloading programs as command line executables (that will terminate).
It is not necessary that your software is a command line exe, but it makes it easier to work with in general.
The next thing you want to do is make sure your software can write signals (or a screener) to a file in the format specified in the guides.
The directory that your strategy will read signal files from is located on the bottom right of your screen. Go ahead and modify your software so that it will write files to that directory.
Note that APM can run other programs with command line arguments, meaning that you can take in the file directory as an argument rather than hard-coding it.
Setting up your APM Strategy
We will be using the External Program section of the strategy settings to run your programs. First enable Use External Program.
The File and Arguments fields are used to specify the program you would like to run.
To schedule your program, put a cron string in the Run External Program field (refer to the cron guide).
If there is more than one program you need to run (i.e. one program to download data and one to generate the signals), then you have two options:
- Create a 'dummy' strategy that does nothing except run your second program on a schedule.
- Create a batch file that will run all your programs. This is the more advanced option, so beware of problems such as not waiting for other processes to finish.
"C:/Users/DownloadData.exe"
"C:/Users/GenerateSignals.exe"
Note that if DownloadData.exe is not a command line executable, then the system may not wait for DownloadData.exe to finish before generating signals.
In that case, you will want to try something like:
powershell -Command "Start-Process 'C:/Users/DownloadData.exe' -Wait;Start-Process 'C:/Users/GenerateSignals.exe';"
It is highly recommended that you test that your external program work as expected by manually running them (press the button beside Run External Program) and checking that your signals were generated in the correct folder.
Once you have set up your external program to run, you can set up the other fields in the strategy settings as usual (make sure to use Local File or File Screener as your signal provider).
Then you should check that the signals are correctly processed by pressing Order Preview.