Search
   ATM » Online Help Manual » The Various Windows » Trading Systems Window Register Login

Trading Systems Window

File... > Trading Systems

"Trading Systems Concepts" explains everything you need to know about what a "trading system" is as far as this software is concerned.  Reading that section will make understanding the below a whole lot easier.

The "General Window Flow" section tells you how to add/edit/delete, etc.  Read that section before continuing below.

This window sets TS apart from all other trading software.  This is where you create your trading systems using clicks of the mouse.

But while this should make it 100% easier to set up your trading systems (as opposed to other software which makes you write your systems in a programming language), there is still a learning curve.  You still need to think.
 

Differences To The General Window Flow

This window behaves slightly differently to the general window flow.  Instead of the "Save" button saving everything and closing the window, here the button is marked "Apply".  It will save everything that's not in a result grid (anything in a result grid is already saved), and keep the window open.

So you might say that the Save button saves the Trading System's "base" details.  And adding Trading Rules and Holidays is kind of like "attaching" those things to the Trading System.

But before you can attach things, you first need the base details saved to the database at least once.  For this reason, the parts of this window that deal with attaching things are disabled until you've done the first save.

Writing out the steps is probably easier than the explanation.  Bolded text indicates a deviation from the general window flow:

  1. On the search window for Trading Systems, click "Add..."
  2. The Trading Systems Update window opens, with some parts disabled.
  3. Enter the system's short description and ID.


 

  1. Click the "Apply" button.  That creates the new Trading System in the database.
  2. The rest of the window is enabled.
  3. Go about filling in the rest of the details, and attaching Trading Rules and Holidays.
  4. Remember that the "Apply" button saves everything that's not in a result grid, and that anything already in a result grid is already saved.

Editing a Trading System, by definition, means that the system has already been saved once, so nothing on the window is disabled.
 

Attaching?

In the general window flow, you start off with a search window, then click a button and the detail window appears.  The detail window is where you enter all the information, and click "Save".

The Trading Systems and Alerts functionalities behave slightly differently, in that the detail windows also have sections that behave like search windows.  So you open the search window as you would in the general window flow, click a button and see the detail window as you would in the general window flow, and click a button there and a different detail window opens.

You need to be able to add as many Trading Systems/Users/Accounts/Holidays as you want, right?  So the process of going to the search window for that "thing", clicking the "Add..." button, filling in the details and saving is how to do that in TS.  You could keep doing that until you used up all the space on your computer - there's no TS limitation on the number you can add.

Well, with Trading Systems and Alerts, you also need to be able to add an unlimited number of Trading Rules and/or Holidays.  So it's just a repeat of the same search-click add-fill in details-save process.  The only difference is that the process starts from the detail window instead of the original search window.

Here's the search window:



You click the "Add..." or "Edit..." button there and get the detail window:



The "Trading Rules" and "Holidays" sections are just like the search window:



You click the "Attach..." or "Edit..." button here and get the second detail window:



Add your Trading Rules one-by-one.  Easy.
 

System ID

Beside the system's description, you also have to enter an ID.



The ID can be anything really, or just a short-hand version of the description.  For example, for a system with a description of "Combination MACD and RSI System #1", you might enter a code of "MACDRSI1".

The ID can be anything up to 10 characters long, but cannot have spaces.  It is generally only used for internal database purposes, and as such you will not be able to change it after saving the system for the first time.  You can see in the picture above, that the field is disabled.  You will be able to change the description, however.

The "Long Description" field is not mandatory.  It's there so you can remind yourself later of what you were trying to achieve with this system.
 

Auto-Trading

The fields in this section are only mandatory if you are going to use this Trading System for auto-trading.  If you were just backtesting then you don't need to fill them in.



Obviously TS needs to know which Account you want this Trading System to trade in.

In the vast majority of cases, the company you choose as the "Data Company" (the broker that TS will pull the price data from), will be the same as the company that the Account belongs to.  However you can, if you wish, trade with one company while using the price data from another.

The "Currency" field here is used for auto-trading only.  When backtesting, you set the currency to backtest in the Backtesting Configuration entry.

"Last check (GMT)" is the date that auto-trading last checked this Trading System.  You could pause a system for a while by editing this date to be somewhere in the future.

"Auto-trading status" has three options:

  1. Enabled - this system is auto-trading;
  2. Disabled - this system is not auto-trading; and
  3. Trade Mgmt Only - this system will cancel any open orders, and will not place any new orders.  It will however, continue to monitor and adjust any open trades, and continue to follow the stop loss and take profit management rules you have specified.

You have to be a little bit careful though, about switching the status from "Enabled" to "Disabled" directly.  That will stop auto-trading abruptly.  The question is, what will happen if a trading system which was auto-trading still has any open orders, or an open trade?  It's all explained on the Auto-Trading section of the Command Centre help page.

But, if there are no open trades and no open orders, you are fine to change the status directly from "Enabled" to "Disabled".

Note however, that if on the Command Centre you have started the auto-trading process, and you set the status of a Trading System to "Enabled", that Trading System is live!  So only set the status to "Enabled" once you are sure the system is set up correctly.
 

Last Bar Used

Both Trading Systems and Alerts have these fields, but they are updated slightly differently.  For Trading Systems, only when the Entry Rules are checked (i.e. a trade is not already open) will the date be updated.  For Alerts, the date is only updated when an Alert wants to fire.



These fields ensure that only fresh price data is being used for entry calculations.  Here's the scenario that these fields try to avoid:

  1. A new bar completes;
  2. TS checks the Entry Rules and finds that they are true.  TS places an order;
  3. The order is taken up.  This Trading System is in a trade;
  4. The price goes in exactly the wrong direction, and the stop loss is taken out very quickly;
  5. TS checks the Entry Rules and finds that they are true.  TS places an order.

The thing is that the bar being checked in steps 2 and 5 are the same bar.  The trade exited so quickly that there wasn't enough time for the next bar to complete (which is a likely outcome if you are using Hourly, Daily bars, etc).

So TS would have placed two orders based on the same bar.  Generally that's not a good thing, hence these fields.  And hence the reason they are only updated when the Entry Rules are checked.

If you want to allow it, you can put a tick-mark in the "If the trade is exited before the entry bar is completed, allow re-entry in that same bar" field.

This is another way to pause a system for a while - by editing these dates to be somewhere in the future (and no tick-mark in the checkbox).
 

Trading Rules



If this tab is mostly disabled, it means you have to click the "Apply" button first.  So do that.  You'll be prompted to fill in any mandatory fields if you haven't filled them in yet.

Existing rules should appear in the result grid automatically without you having to click "Search".  Click the "Attach..." button to add a new rule to this system.

You can filter the search results by a specific Rule Type or Config Family.  Note that you don't have to use a value from the pull-down lists in those fields - you can actually type in whatever search criteria you like.  So you could type "Long" in the Rule Type field, click Search, and only the Long settings would show up in the result grid.

A quick note:

  • An example "Rule Type" is "Long Entry Rules".
  • An example "Config family" is "Bollinger Bands".  A different way to describe them might be "Indicator family".
  • Some example "Config types" are "Bollinger Bands flaring", "Close below lower Bollinger Line", etc.

When you click the "Attach..." or "Edit..." button, the "Trading System Settings Update" window opens:



The first thing to do on this window is choose what kind of Rule type that this rule will be for.  Once that's done, the Config family, and Config type pull-down list fields will become enabled.

If you select a Rule type of "Long Entry Rules", say, then the Config type pull-down list is going to populate with all the available Rules.

But, if you select a Rule type of "Long Entry Values", then the Config type pull-down list is going to populate with all the available Values.

The "Config family" pull-down list can be used to filter the Config type field, if you want to do that.  But this field is not mandatory.

Once you have selected a Config type, then the other fields on the window that you need to fill in will become enabled.  The fields that you have to fill in are different depending on the Config type, but a safe bet is that if the field is enabled, then it's mandatory.
 

# Bars To Load

When you add or edit a Rule, sometimes you will be asked to fill in the "# Bars To Load" field.  This value is used to determine how many bars of price data should be retrieved.

Less bars means faster processing, and so TS tries to retrieve the minimum possible.  When something like a Simple Moving Average is used, it's pretty easy to work out how many bars are required - if it's SMA(20) then TS retrieves 20 bars.

But for other Rules, such as "Current SMA Swing High Lower Than Previous", it's not possible to mathematically calculate the number of bars that will be required.  Maybe the previous SMA Swing High occurred 30 bars ago.  Maybe 40.  It's in these situations that you'll need to enter the value yourself.  Choose a value big enough so that enough bars are going to be retrieved to do the calculation, but small enough so as not to slow TS down.
 

Apply Interval To All Existing Rules

The "Apply Interval to all existing rules" checkbox, if checked, will overwrite the Interval for all existing rules belonging to the same Trading System.

This is handy for when experimenting, because you can copy a Trading System, then edit just one Rule and the interval will get changed for all Rules.

Click the OK button.  That will take you back to the Trading Systems Update window.  The new rule you added should automatically appear in the list, and is already saved to the database.
 

I Want This To NOT Be True

Rules evaluate to either true or false.  Putting a tick mark in this checkbox reverses the result.

That's pretty much all you need to know about this option, but if you want to read about it in a lot more detail, continue below.

As well as this "I want this to NOT be true" option, generally there are always opposite rules available.  E.g.:

  1. Close Above Simple Moving Average
  2. Close Below Simple Moving Average

So what's the difference between these two?:

  1. "Close Above Simple Moving Average" and using the "I want this to NOT be true" option
  2. "Close Below Simple Moving Average"

Well, there is a slight one.

When the Close is below the SMA, both option #1 and #2 are true.

When the Close is above the SMA, both option #1 and #2 are false.

When the Close is exactly the same as the SMA, option #1 is true, while option #2 is false.

Using "I want this to NOT be true", TS calculates the result of the rule as if you did not want to use this option, then it takes the opposite of that result.

So when the Close equals the SMA, no, it's not above the SMA so the normal result is false, then taking the reverse, the result becomes true.

Here's one example to consider - the MACD Histogram cross from Oversold into Overbought.

For this one, you choose the following Long Entry Rules:

  1. "MACD Histogram In Oversold", and set the Bar Offset to 1, meaning you want this rule to have been true 1 bar ago; and
  2. "MACD Histogram In Overbought"

These two rules combine to allow Long orders to be placed only when the MACD Histogram crossed from Oversold into Overbought.

But what if the value of the MACD Histogram 1 bar ago was exactly zero?  In this case the MACD Histogram is neither in Overbought, nor in Oversold.  So while the MACD Histogram has legitimately crossed from Oversold into Overbought, TS will disallow the trade because it thinks the MACD Histogram was not in Oversold 1 bar ago.

(Remembering that TS is in fact doing exactly as you told it to do).

This situation is not going to happen very often.  If it did, all that happens is you miss a trade.  But if you're worried about it, set the Long Entry Rules to this:

  1. "MACD Histogram In Overbought", use the "I want this to NOT be true" option, and set the Bar Offset to 1; and
  2. "MACD Histogram In Overbought"

Doing it this way effectively changes the entry rule from being "enter when the MACD Histogram crosses from Oversold into Overbought" to "enter when the MACD Histogram crosses from not in Overbought into Overbought".  There's a subtle difference.
 

Move To Break Even

This would be more correctly written as "Move To Entry Price".  Commission, if you paid any, is not taken into account.  So if you did happen to pay commission then the stop loss would not strictly be moved to break-even.
 

Money Management

There are three different ways TS can implement Money Management.

The first is a fixed percent of your balance:



TS will check your balance, see how many pips you are going to lose should your stop loss be taken out, and work out how many units to buy such that if your stop loss is taken out, you would lose no more than 2% (in this example) of your balance.

It should be noted, and this is true for all of the three money management techniques, that TS is sometimes restricted by the broker on the number of units to purchase.  Oanda allows any number of units to be purchased, however the norm is that the units must be purchased in multiples of 10,000.  And then Gain Capital allows only multiples of 100,000.

When TS has to round to a multiple of 10K or 100K, it will always round down.  The following table gives examples:
 

TS Wants To Purchase (Units) Oanda Multiple of 1K Multiple of 10K Multiple of 100K
1 1 0 0 0
3,769 3,769 3,000 0 0
9,999 9,999 9,000 0 0
10,000 10,000 10,000 10,000 0
32,769 32,769 32,000 30,000 0
99,999 99,999 99,000 90,000 0
100,000 100,000 100,000 100,000 100,000
132,769 132,769 132,000 130,000 100,000
199,999 199,999 199,000 190,000 100,000
200,000 200,000 200,000 200,000 200,000


The next money management technique is just to always buy a fixed number of units.



However, as you can see, you can tell TS to not go ahead with the trade if that fixed number of units is going to be risking more than a certain percentage of your balance.

And lastly is Variable Fractional Percent:



Variable Fractional Percent is good for Trading Systems that go on long runs of consecutive winners or losers.  What it does is essentially the same thing as the first money management technique mentioned - determines the number of units to purchased based on the percent of your balance at risk.

However, whereas the first technique always bought a fixed percentage, Variable Fractional Percent, as the name implies, varies the percent to risk.  And it does so based on the results of the previous trades - all going well and it increases the percent of balance to risk, and all not going well and it decreases the percent of balance to risk.  All going terribly and the percent to risk will be reset back to the minimum value allowed.

It's like a confidence thing - the Trading System has many winners in a row, so it starts risking more and more as it gets more confident.  Or another way to look at it is "make hay while the sun shines".  And the more losers in a row, the less confidence it has, so the less it risks.  So as I said, it's good when the system generally has consecutive wins, or consecutive losses.

Variable Fractional Percent is not good for Trading Systems that tend to have a winner after a loser, and vice versa.  In this case you'd get a winner, so you'd risk more.  Then you have a loser, so you risk less.  Then you have a winner, so you risk more.  And so on.  As you can see, the Trading System would be having the losers when it is risking more, and having the winners when it is risking less.
 

 

No Trading

TS provides many different reasons for your system to not trade.  Hopefully they are self-explanatory.



However, not all of them can be used together as they might interfere with each other.  For example, if you allow only 3 Long trades in a row, and you don't allow Short trades until there has been 5 Long trades in a row, then no Short trades will ever be made.  In fact this system will make its 3 Long trades and then stop, as it's not allowed to do more than 3 Long trades in a row, and it's not allowed to do any Short trades until there have been 5 Long trades.

Another example is where you don't allow Short trades until there has been 2 Long trades in a row, and you don't allow Long trades until there has been 2 Short trades in a row.  In this example, only 3 trades will be made before the system can no longer trade - either Short, Short, Long; or Long, Long, Short.  After that third trade, there has been neither 2 Long trades in a row (meaning no Shorts can be traded), nor 2 Short trades in a row (meaning no Longs can be traded).  So for these fields, you can set both of them to "1", or one to "1" and another to a bigger value, or leave one blank and set the other.  But you probably shouldn't set both of them to a value bigger than 1.

The question is, how does TS know when to resume trading, if the trades are not entered for the reasons selected on this tab?  For example, if you set this system to stop trading when there are 2 long losers in a row, and there are 2 long losers in a row, then how does this system know that a winner happened so it can resume trading?

That's where paper orders and paper trades come in.  If any of the rules you set here are met, instead of sending the order or trade to the broker, it creates a paper order or trade.  Then instead of modifying, cancelling, or closing the order or trade at the broker, it does it to the paper one.

Once that paper trade is complete, TS includes it in the calculations.  In the example given, once a paper trade results in a (paper) win, TS will allow this system to trade live again.
 

Paper Orders and Trades Are Considered Real

They are considered real by every other calculation.  The only difference is that they have not been sent to the broker.  So, for example, it's not "X real Long winners in a row", it is simply "X Long winners in a row".
 

Profit Factor

Profit Factor is calculated as:

(Av Win / Av Loss) * (Pct Winners / Pct Losers)

If it equals 1, the system has neither lost nor made money.  If it's less than one then the system is losing money, more than one and the system is making money.  The bigger the number, the "better" it is.  But it falls down in that it doesn't take into account the total number of trades, nor the total amount won/lost.
 

Risk-Return

Risk-Return is calculated using the initial pips risk versus how many pips were actually won/lost for completed trades only.  That is, the calculation is not done using the initial stop loss versus the initial take profit.
 

Holidays

N.b. if this tab is disabled, it's because you need need to save the Trading System once before you can attach things to it.



Trading Systems won't trade during the Holidays that you have attached.

Holidays will only work during auto-trading though.  Backtesting will not take holidays into account.  (Although, there are Time-Based trading rules which you can use to do a similar thing).

The reason that Holidays will not work while backtesting, is that backtesting works off interval data, where all that is known is the Open, High, Low, and Close prices within the timeframe of that bar.  There is no way to tell what the price was at a particular time within that bar, and therefore holidays like 11:33AM to 11:42AM cannot be backtested.

I recommend attaching the "weekend" Holiday to systems that using intervals shorter than Daily.

The Search Criteria fields are completely optional, and serve only to filter the results.  Clicking the Search button with no Search Criteria entered will retrieve all records.
 

Trading Alerts

Specify here which events you want to trigger an Alert.



The two events marked with asterisks - Trade Entry and Trade Exit - may not trigger the Alert as soon as that event occurs.  The reason is that with Limit orders, an order is placed at a particular price, and then the currency's price is supposed to rise up through that value (for Longs) in order for the trade to be entered.

The next time TS downloads the transactions for that company, it will then know that the trade has been entered (or exited) and send the Alert.  So it may depend on how often you have this Trading System set to auto-trade, or how often you are downloading the Transactions, that decides how close to real-time the Alerts are sent for those two (and only those two) events.

The other four events should trigger the Alerts in real-time, as will the Trade Entered alert when using Market orders.
 

Subscriptions

Broadly, there are two different kinds of Alerts within TS:

  1. Price and indicator Alerts
  2. Trading Alerts

Subscribing to Alerts gets you both kinds.  However, Trading Alerts (the ones on this tab) will only fire when this Trading System is auto-trading, which means you'd need to be subscribed to that as well.
 

Other


 

Last Gasp In General

The Last Gasp setting tells TS to forget about placing the order if the price has moved too quickly.  Let's say you wanted to place a Long order at 1.2000.  But the price moves so quickly that it is now 1.2025.  Do you still want to place the order at that higher price?  If you set the Last Gasp to "10", TS would give up on placing the order.  If you set the Last Gasp to nothing or "30", TS would still place the order at the higher price.
 

Last Gasp For Gain Capital

For Gain Capital, if you choose to pass on any trade when the price goes a number of pips past the calculated entry point, the actual value used will be 5 pips lower than what you set.  TS always places Limit Orders, never Market Orders with Gain Capital.  The price is then supposed to rise up through (for Long entries) the order's entry point, and if it does then we are in a trade.  But Gain Capital has a restriction on how close to the current price Limit Orders are allowed to be set.

An example:  Wanted entry price is 1.2000 with a Last Gasp of 10 pips.  The price is now 1.2009.  Gain Capital will not allow a Limit Order to be placed any closer than 1.2014, but that would violate the Last Gasp setting of 10.  So even though you set 10 pips, in practice it will be 5 pips.

Don't worry about any of that for Oanda.  They allow orders to be put anywhere.
 

Number Of Pips At Risk

As the heading implies, you can tell TS to not place any orders where the stop loss is more than a certain number of pips away from the entry price.
 

Minimum Balance

You can specify an account balance which will stop this system trading if reached.  Note that this amount has to be breached before trading will stop, so the actual value may vary depending on how much money was lost during the last trade.
 

One Cancels The Other (OCO)

If there is a trade open, TS will cancel the order in the other direction (if there is one).

But as the description on the window says:  "Don't rely on this setting to ensure your system isn't in both a Long and Short trade at the same time.  Brokers who offer OCO orders cancel the other order automatically.  This software can only check the next time Auto-Trading runs, and by that time maybe both orders are taken up."
 

Steps To Get A System To Start Trading

Start the price data downloading, and/or creation.  Without price data coming in, the Trading Systems won't have fresh prices to work off.  Then:

  1. Create and save your Trading System.
  2. Set the "Auto-trading status" field to "Enabled" (and save again).
  3. On the Command Centre, go to the "Auto-trading" tab.
  4. Click the "Start" button.

Here's a full checklist.
 

Editing a Trading System While It's Currently Auto-Trading

You can edit a system while it's auto-trading or trade mgmt, but the changes won't come into effect until the next time Auto-tading is kicked off for that system.  However, you can't delete a Trading System unless its status is "Disabled".

And if the system is auto-trading or doing trade management only, click the "Refresh" buttons before clicking "Apply" or "OK".  The auto-trading might update the last checked or last bars used dates while you have the window open.  Without refreshing those values, you'd be saving the old dates back over the new ones.
 

First Time?

Quotes

"The User Manual is enormously helpful."
- P.A. (Germany)

Automated Trading Machine

Featured Articles

Download The Science of Getting Rich free!

Video Tutorials

New Indicators

Announcements

Blog

Popular Pages

Membership Membership:
Latest New User Latest: billysy
New Today New Today: 0
New Yesterday New Yesterday: 1
User Count Overall: 346

Members Where Are They:
Visitor [6] : Home
Visitor [1] : The Good & Bad of Automated Trading
Visitor [1] : The Problems With Backtesting
Visitor [1] : Trading Systems Window
Visitor [1] : Average Pullback Histogram
Visitor [3] : Forgetting About The Spread
Visitor [1] : Knowledge Base
Visitor [3] : Blog
Copyright Thinking Stuff Pty Ltd  ·  Contact Us  ·  Disclaimer  ·  Privacy Policy  ·  Sitemap