Automated Trading Machine (ATM) makes it simple to remove fear and greed from your trading. Automated trading is no longer just for the rich or nerdy. Our revolutionary software runs on your computer, using your trading rules, but none of your emotions. There's just one requirement - you know how to use a mouse. Learn more...
General usage
Scheduled Processes
Scheduled process run from the Command Centre. Some run at recurring intervals of your choosing, such as every minute, every 5 minutes, every 30 seconds, every 24 hours, or whatever. Others are "streaming" in that it's more like flicking a light switch on or off.
These scheduled processes do various things. Some download price bars from a broker, some create price bars, one kicks off automated trading, another alerting, another downloads events from the Forex Factory calendar and converts them to holidays. And so on.
Scheduled processes for downloading price bars
There are streaming downloads, recurring downloads, special recurring downloads, backfills, and historical prices.
Streaming downloads lets ATM receive prices from the broker as soon as the broker sends them. The brokers are always broadcasting the new prices, and by turning on the streaming process what you're telling ATM to do is log in to that broker and start saving the prices it receives. Mostly brokers offer tick prices in this way, and then you would need to also run the recurring process for that broker that creates price bars.
Recurring downloads lets you grab a few bars at regular intervals. Special recurring downloads target only those price bars that are needed for trading systems that are auto-trading right then at that time (and active alerts).
Backfill refers to trying to get price bars you might have missed, had your computer been turned off, disconnected from the internet, or crashed.
Historical prices are those going back potentially many years.
Not all brokers offer all options. But yet there are all of these scheduled processes for all the brokers. The ones that don't actually work have an explanatory note, telling you what to use instead. If having those that don't work still appear in the list is a bit strange, you can filter the list to only those that can be run.
Command Line Arguments
ATM can be started from the command-line (DOS prompt). All arguments below are optional, except that specifying /scriptargs= without /script= will have no effect. The ordering of the arguments is not important.
Remember that spaces are used to delimit command-line arguments, so if an argument has a space in it then you need to use double-quotes. In fact it's safest just to always use double-quotes.
/file=
When you start ATM normally, it either tries to automatically open the last file you had open, or shows the New File Wizard. If you do not use /file= then ATM reverts to that default behaviour. If you do use the argument then ATM opens the settings file you specify instead.
C:\>"C:\InstallDir\tsatm.exe" /file="C:\User\Bob\Settings File 1.tsatm"
/title=
Prefixes your text to the ATM title (which is normally "Thinking Stuff's ATM vX.Y.Z").
C:\>"C:\InstallDir\tsatm.exe" /title="My ATM 1"
Using the arguments above the title becomes:
My ATM 1 - Thinking Stuff's ATM vX.Y.Z
/script=
Runs a script / executable / batch file of your choosing after ATM has finished opening a settings file.
C:\>"C:\InstallDir\tsatm.exe" /script="C:\SomeDir\SomeProgram.exe"
/scriptargs=
Passes the arguments to the script specified by /script=. But there are some hoops to go through to get the right arguments passed to your script. DOS first parses what you type at the command-line, and then opens ATM with the command-line arguments you give it, and then ATM parses those arguments and forwards anything in /scriptargs= to the script. Here's an example:
C:\>"C:\InstallDir\tsatm.exe" /script="C:\SomeDir\SomeProgram.exe" /scriptargs="arg1 arg2 arg3"
That passes these 3 arguments to SomeProgram.exe:
- arg1
- arg2
- arg3
It's especially important to wrap those script arguments in double-quotes, otherwise only the first one will be treated as an argument to be passed to the script (the other two being considered arguments being passed to ATM due to the spaces).
Scriptargs that contain spaces
For example, you might want to pass a filename that has spaces through as an argument to the script. Now it starts to get a little tricky. This is the wrong way:
C:\>"C:\InstallDir\tsatm.exe" /script="C:\SomeDir\SomeProgram.exe" /scriptargs="arg1 with spaces arg2 arg3"
That passes 5 arguments to SomeProgram.exe:
- arg1
- with
- spaces
- arg2
- arg3
So you might try to wrap "arg1 with spaces" with double-quotes. Like this:
C:\>"C:\InstallDir\tsatm.exe" /script="C:\SomeDir\SomeProgram.exe" /scriptargs=""arg1 with spaces" arg2 arg3"
But that wouldn't work either. Those first two double-quotes in /scriptargs="" would cancel each other out, and much like having no double-quotes at all, only arg1 would make it to SomeProgram.exe.
In this case what you need to do is, while remembering to wrap the entire thing in double-quotes, put a backslash before every double-quote in-between those surrounding double-quotes:
C:\>"C:\InstallDir\tsatm.exe" /script="C:\SomeDir\SomeProgram.exe" /scriptargs="\"arg1 with spaces\" arg2 arg3"
Now 3 arguments will be passed to SomeProgram.exe:
- arg1 with spaces
- arg2
- arg3
All good. Notice those double-quotes don't make it into SomeProgram.exe per se - they are just used to indicate that the first 3 words are all part of the first argument. More than likely "arg1 with spaces" would actually be a filename with spaces, so that's how you'd do it.
Scriptargs that contain double-quotes
First I have to ask, ok, why? But it's possible. And ugly. Luckily this should be a very rare case.
C:\>"C:\InstallDir\tsatm.exe" /script="C:\SomeDir\SomeProgram.exe" /scriptargs="\"arg1 \\"\"with\\"\" spaces\" arg2 arg3"
That's right - you need to type \\"\" for each double-quote that you want to make it into SomeProgram.exe. Here are the arguments that will be passed now:
- arg1 "with" spaces
- arg2
- arg3
%title% and %file%
These two placeholders (or tokens, or whatever) will be converted by ATM into the application title and the settings file full path, respectively, and then passed on to the script. The values used are simply whatever file was opened regardless of method, and whatever application title is visible regardless of it being customised or not:
C:\>"C:\InstallDir\tsatm.exe" /script="C:\SomeDir\SomeProgram.exe" /scriptargs="%file% %title%"
Now the 2 arguments are:
- C:\User\Bob\Settings File 1.tsatm
- Thinking Stuff's ATM vX.Y.Z
(Assuming of course that "C:\User\Bob\Settings File 1.tsatm" is the file opened and you didn't use a custom title).
These placeholders can only be used in the /scriptargs= argument. ATM will put double-quotes around them individually, so you don't need to. But you still need to wrap the entire /scriptargs= setting with double-quotes as per the example above.
Entering this information in the Options window
/file= aside, all of these settings are also available in the Options window in ATM. Two points to note about that:
- If you run ATM from the command line, the arguments above will override the settings in the Options window.
- Entering the values in the Options window is much easier with respect to spaces and double-quotes (because we no longer need to worry about the DOS level of parsing). You don't need to wrap the entire thing in double-quotes. But you do still need double-quotes for arguments with spaces. Forget about the backslashes though:
In DOS prompt: /scriptargs="\"arg1 with spaces\" arg2 arg3"
Field on Options window: "arg1 with spaces" arg2 arg3And to enter an argument which contains a double-quote, now you use the backslash:
In DOS prompt: /scriptargs="\"arg1 \\"\"with\\"\" spaces\" arg2 arg3"
Field on Options window: "arg1 \"with\" spaces" arg2 arg3
%title% and %file% can also be used in the arguments field of the Options window.
Testing
We provide a simple exe file which can use to test your argument settings. Located in the ATM installation directory is a sub-directory called "testargs". In there you will find a file called TestArgs.exe. All that file does is show a message telling you the arguments you passed to it.
Set the script to that TestArgs.exe file, and play around with your argument settings until you get it right. Then change the script to be the actual script you want to use.
TestArgs.exe was written using AutoHotKey (AHK). TestArgs.ahk, also in the testargs sub-directory, is the AHK code. It's mostly a direct copy-paste from an example in the AHK help file.
Why would you want you want to do any of that?
See automating ATM.
How To Use Indicators
There are 4 basic concepts that you need to know:
- There are Rules and there are Values. Rules decide when an action is allowed. They evaluate to Yes/True/Do or No/False/Don't. Values decide where that action will be done. They evaluate to a single price on the chart - the price where you want to place an order; the price where you want to move the stop loss or take profit.
- Relative Strength Index (RSI) is an example of an Indicator.
- RSI(14) though, is a line on the chart. It is the combination of indicator plus the parameters that creates a line. RSI(14) is a different line to RSI(20).
- Everything is a line. The close price is a line. Volume is a line. The entry price of a particular trade is a (flat) line. RSI(14) is a line. RSI(20) is another line.
Rules
To get a line into something that can become a true/false answer means that we must compare it. We compare it:
- With a particular number - is Line 1 above 100?
- With its previous values - is Line 1 going up?
- With a different line - is Line 1 above Line 2?
- With the entry price - is Line 1 above than the entry?
The first step then, is to choose what kind of comparison will be done. Here are the options:
Use the value of a line
- Line 1 equals X
- Line 1 is above X
- Line 1 is below X
- Line 1 is in a range
- Line 1 is not in a range
Compare the value of a line to the line's previous values
- Line 1 is rising
- Line 1 is falling
- Line 1's value is the least of the last X values
- Line 1's value is the most of the last X values
Compare the value of a line to the value of a different line
- Line 1 is equal to Line 2
- Line 1 is above Line 2
- Line 1 is above Line 2 by more than X
- Line 1 is above Line 2 by less than X
- Line 1 is below Line 2
- Line 1 is below Line 2 by more than X
- Line 1 is below Line 2 by less than X
- Line 1 is apart from Line 2 by more than X
- Line 1 is apart from Line 2 by less than X
Compare the value of a line to the trade's entry price
- Line 1 is above the trade's entry price
- Line 1 is above the trade's entry price by more than X
- Line 1 is above the trade's entry price by less than X
- Line 1 is below the trade's entry price
- Line 1 is below the trade's entry price by more than X
- Line 1 is below the trade's entry price by less than X
Those last ones can only be used for non-entry rules.
Anyhow, with one of those selected, all that's left is to fill in the details for Line 1 (and Line 2 if applicable).
A common entry rule is "the close of the bar is above the simple moving average". The close price is just a line, and so is the average, so you would use "Line 1 is above Line 2" - Line 1 is the close, and Line 2 is the average. When this is true the signal is given.
Values
Values are easier, because you don't need to bother with the options above. You just create a line and that is the value. E.g. put a take profit at the entry price plus 50 pips, the stop loss at a simple moving average, etc.
More Options
You are given these very basic options to modify a line:
- Line + X
- Line * Y
- (Line + X) * Y
- (Line * Y) + X
Negative numbers can be used for X and Y.
What these settings allow you to do are to add/subtract a certain number of pips or percentage. For example:
- Close price plus 5% would be: Close * 1.05
- High plus 50 pips would be: High + 0.0050 (for EUR/USD)
If you need more than these basic options, you can create a custom indicator.
Indicators which normally consist of more than 1 line
If you think of the Bollinger Band indicator, you normally think of 3 lines - upper, middle, and lower. But for our purposes, those are actually 3 different Indicators:
- Bollinger Band Upper Line
- Bollinger Band Middle Line
- Bollinger Band Lower Line
And this is true for any indicator which normally consists of more than a single line.
Indicators which normally wouldn't be considered Indicators
How can candlesticks be "a line"? Well, at its simplest, a bar either fits a candlestick pattern or it does not. Candlesticks are therefore in a true/false form. But that doesn't fit into the "everything is a line" theory. So instead of thinking in terms of true/false, change it to 1/0.
Most of the time, a candlestick pattern will not be present. The "indicator" value stays at zero. When the candlestick pattern appears, the indicator spikes up to 1. Then back down to zero when the pattern is gone.
What was just described is simply an oscillating indicator, with values ranging between 0 and 1. That's now a line which can be used like any other line. So the basic concept is to replace true/false results and anything similar, with numbers. 0/1. 1/2. -100/100. It doesn't really matter as long as they are numbers.
So let's say we use 0 (zero) for when the candlestick pattern is not there, and 100 when the candlestick pattern is there. To make a rule that uses that candlestick pattern, use "Line 1 equals X" - Line 1 is the candlestick, and set X to 100. When this is true the signal is given.
It turns out candlesticks are actually a little more complex than true/false, anyway. The following are possible:
- the candlestick pattern is present in a bullish way (result: 100)
- the candlestick pattern is present in a bearish way (result: -100)
- the candlestick pattern is not present (result: 0)
Further, there are a couple of candlestick patterns that give five values: 200, 100, -100, -200, zero. You should chart the candlestick you are interested in to see its possible range of values. And that's the beauty of treating everything as a line - you can chart and visualise all indicators and see how they behave.
Note: peak and trough (and swing) calculations, "Current Pattern" and "Previous Pattern" are also treated as oscillating indicators:
- Higher Peak = 2
- Higher Trough = 1
- Lower Trough = -1
- Lower Peak = -2
To Select More Than One Row
Not all windows allow this, but for those that do allow it, the way to select multiple rows is two-fold.
First, you can click on the first entry you want to select, then hold down the Shift key while you click on the last entry you want to select. All entries in between the two you clicked will also be selected.
Second, you can click on the first entry you want to select, then hold down the Ctrl key while click on the other entries you want to select, one by one. Only the entries you click will be selected.
Search Criteria
Search criteria are cumulative, and an entry must match all search criteria for it to show up in the search results.
To not use a particular search field, clear it. For the text fields that means emptying the field. For lists, select the top, empty entry. For date fields put a tick in the "From Start" and "To End" boxes.
Not using any search criteria is normally fine - simply all entries will show up in the results.
Text fields
Text fields are where you can type anything you like. If what you typed appears anywhere in an entry, the entry is shown in the results. For example, let's say you have three users:
- NotReal
- NotRealFXCM
- FXCMBob
If your search criteria was eal, then both "NotReal" and "NotRealFXCM" will show in the results.
If your search criteria was ealf, then only "NotRealFXCM" will show.
If your search criteria was xcm, then "NotRealFXCM" and "FXCMBob" will show.
If your search criteria was o, then all three would show.
If your search criteria was empty, then all three would show.
Mandatory Fields
If you have not filled in a mandatory field, or used an invalid value (such as a negative number where you're not allowed to enter a negative number), then a little red round icon will show up next to that field.
The red error icons won't disappear until you click the OK button again. That is, they won't disappear as soon as you enter a value - they disappear when you click "Apply" or "OK".
Sometimes though, you might have actually entered a value into a field, clicked "OK", and yet the red error icon is still shown.
In this case there is most likely validation performed on the value you entered. i.e. it's not just a case of putting any value in the field - there might be some restriction on what that value can be (such as negative numbers not being allowed).
If it's not obvious what's wrong with what you entered into that field, you can place your mouse over the red icon and it will tell you.
OK, Apply, Close
Apply saves the information.
Close closes the window.
OK = Apply + Close
Link Between Data Manager Entries and .tsphd Files
"Data Manager entries" and "Price data configuration entries" are used interchangeably.
You create these to tell ATM (a) what prices you want to gather; and (b) how to gather them.
ATM will create one .tsphd file on your computer for every Data Manager entry. And that's where the prices are physically stored on your computer. But that's the end of it as far as Data Manager entries are concerned. They just do the setup - they don't do any gathering.
Gathering is done on the Command Centre window (downloading), File Loader window (loading from text files), or the "Bulk Price Bar Creation" tab on the Data Manager Search window (creating price bars from other prices you have already downloaded or loaded from file).
Location of the .tsphd files
Is set by you when you first create the settings file. It can be viewed and changed on the Options window.
Deleting Data Manager entries
You are given the choice of whether or not you also want to delete the .tsphd file. So you may have more .tsphd files than you do Data Manager entries. That's fine.
Adding a Data Manager entry when there is already a .tsphd file
So you delete a Data Manager entry but choose not to delete the .tsphd file. Then you re-create that same Data Manager entry. The .tsphd file is already there. ATM doesn't overwrite it - it just connects to the existing one.
What this means is, someone can give you their .tsphd file, and you copy it to your price history directory (as set on the Options window). Then you create the matching Data Manager entry, and all that price history will immediately become available for use.
See also:
Rules and Values
Trading systems
Rules specify when some trading action is to take place; values specify where.
Rules and values - where you have one, you always need both.
For example, it's optional to specify stop loss management rules. But if you do, you also have to specify a stop loss management value (and vice versa). The former tells ATM when it should move the stop loss; the latter at what price to move it to.
Here's the full list:
| Category | Stage | Description |
| Entry | Entry Rules | Specify when you are allowed to trade. All rules (if there are more than one) must evaluate to true for an order to be placed. Use groups to set up optional entry rules. |
| Entry Values | If the Entry Rules allow an order to be placed, the Entry Values specify the entry price for the order. "Enter At Market" creates a market order. Any other setting creates a limit order. | |
| Initial Stop Loss Value | If the Entry Rules allow an order to be placed, the Initial Stop Loss Values specify the initial stop loss price for the order. | |
| Initial Take Profit Value | If the Entry Rules allow an order to be placed, the Initial Take Profit Values specify the initial take profit for the order. | |
| Stop Loss Management | Move To Break-Even (Rules) | Once in a trade, these Rules determine when the stop loss will be moved to a position of break-even. (More correctly, to where the entry price was, because commission is not included in the calculation). As the where is already known (i.e. the entry price), there are no matching Values required in this one case. |
| Stop Loss Mgmt Rules | Once in a trade, the Stop Loss Management Rules determine whether or not the stop loss will be moved. All rules must evaluate to true for the stop loss to be moved. There are 9 different groups (#1-#9) for stop loss management. | |
| Stop Loss Mgmt Value | If the Stop Loss Mgmt Rules allow the stop loss to be moved, the Stop Loss Management Values specify where the stop loss will be moved to. Make sure to match up the numbers (#1-#9) to the rules. A stop loss will never be moved to a position of increased risk though. That is, a stop loss can only go up for long trades, and only down for short trades. "Exit At Market" can be used here. | |
| Take Profit Management | Take Profit Mgmt Rules | Once in a trade, the Take Profit Management Rules determine whether or not the take profit will be moved. All rules must evaluate to true for the take profit to be moved. There are 2 different groups (#1, #2) for take profit management. |
| Take Profit Mgmt Value | If the Take Profit Mgmt Rules allow the take profit to be moved, the Take Profit Management Values specify where the take profit will be moved to. Make sure to match up the numbers (#1, #2) to the rules. A take profit can be moved up or down for both long and short trades. "Exit At Market" can be used here. |
Each of the above can be used for both the Long and Short directions.
You can have multiple rules, of course. But less obvious is that you can also have multiple values.
See also:
- What determines a complete trading system
- Stop Loss Mgmt #1-#9, Take Profit Mgmt #1, #2
- Multiple timeframes
- Trading decision flowchart
Alerts
Alerts have only alerting rules - there are no values to worry about. This is because alerts only need to know when to send you a notification.
Normally all alerting rules must be true for alert to fire. However, you can use groups to set up optional alerting rules.
Result Grid, Search Result Grid, Datagrid
Here's a result grid:
For most result grids, you can double-click a row and that is the same as clicking the "Edit..." button. You can right-click on a row and a pop-up menu will appear with more options.
Sorting
Click on a column header once to sort the grid by that column. Click that same column header again to sort in the opposite direction.
Re-ordering columns
Click on a column header, and keeping the mouse button pressed, you can drag the column to a new position.
Recent blog posts
- Mid July 2010 Update
- Start of June 2010 Update
- New Release: v3.0.2 - Copy, better error message, more options
- New Release: v3.0.1 - The Stabilise-ening
- Ah, The First Bug [Fixed in v3.0.1]
- New Release: v3.0.0 - The Rewrite
- Start of February 2010 Update
- End Of 2009 Update
- New Release: v2.0.10
- New Release: v2.0.9 - Free





Recent comments
1 week 3 days ago
2 weeks 3 days ago
2 weeks 3 days ago
2 weeks 3 days ago
2 weeks 4 days ago
2 weeks 4 days ago
2 weeks 4 days ago
5 weeks 8 min ago
9 weeks 4 days ago
9 weeks 5 days ago