Trading Systems Coding: Using Your System
  1. Trading Systems Coding: Introduction
  2. Trading Systems Coding: System Design
  3. Trading Systems Coding: The Coding Stage
  4. Trading Systems Coding: The Coding Process
  5. Trading Systems Coding: Testing, Troubleshooting and Optimizing
  6. Trading Systems Coding: Using Your System
  7. Trading Systems Coding: Conclusion

Trading Systems Coding: Using Your System


By Justin Kuepper
Contact Justin

You are now on your way to having a working, profitable trading system. All that is left to do is to apply this trading system to your actual trading. In this section, we will take a look at the ways in which this can be done.

Compiling Your Code
The final step in the actual development of your trading system is compilation - that is, converting your code into a file that the trading software can execute, or run, at any given time without re-reading the code.

The way in which code is compiled differs between trading programs. However, the majority of them simply let you click a compile button and do one of two things: either 1) the program will compile the code and create a new file, or 2) the compiler will list the errors that you have made in your code (as we saw in the previous section). Because MetaTrader has a standard setup, we will use its trading application as an example for the purposes of this tutorial.

MetaTrader's "Compile" button can be found on the top tool bar:



Assuming the compilation goes well, you will now have an executable file that your trading program can quickly read and apply to your charts.

Applying the System to Your Charts
Most trading applications will let you easily apply your trading system within the trading application by either letting you drag the file onto the chart, or inserting it via a menu. MetaTrader allows you to drag the executable file from the "Navigator" window onto the chart to which you wish to apply your trading system.

After this, a dialog box comes up with several options:


Figure 2

Common
The first set of options is standard with many trading applications. The first option simply lets you define what types of positions you are willing to take (long, short, or both). The second option lets you enable "alerts", which are pop-up windows that notify you when your criteria for a trade have been met.

Live Trading
There are two ways in which you can apply your trading system:

1. Semi-Automated Systems - Semi-automated systems are those that alert you to new trades that meet your criteria. Although the alerts themselves are automated, the trades are not placed automatically - hence the "semi" prefix. Although this type of system carries significantly less risk, it also requires you to be near a computer at all times. However, recent innovations have helped solve some of these inconveniences by allowing signals to be sent via email, phone (short message service) or other hi-tech media.

2. Automated Systems - Automated systems are those that place trades with your broker automatically - that is, they require no intervention on your part. This type of trading system involves significantly more risk, especially if there are logical errors that you did not catch when testing. Therefore, it is imperative that you either paper trade or semi-automate your trading system to be sure that it performs as expected in a live environment. (For further reading, see Demo Before You Dive In.) Note that these trading systems will also require you to complete additional paperwork for your broker stating that they can't be held responsible if your trading system generates large losses.

Safety
The two options here (see Figure 2) let you determine whether or not you are willing to let the program call external dynamic link libraries (DLLs). Remember that DLLs are libraries that let you reuse code from other people's trading systems. If your trading system makes use of these external DLLs, then you will need to enable these options. If not, then you are best off leaving these unchecked.



Inputs
Here is where you can define the inputs for the trading system if you did not specify them directly in your code:


Figure 3

Notice that this area enables you to insert custom inputs without modifying the code at all. This is useful if you plan on changing your inputs, but want to use the same basic strategy. Note that if you optimized your variables, this option would not be available.

Conclusion
Now you should be able to compile and apply your trading system! Again, be sure to paper trade - or at least semi-automate - your trading system before allowing the system to place trades automatically. Failure to do this could lead to large losses should there be a logical error in your code.
Trading Systems Coding: Conclusion

  1. Trading Systems Coding: Introduction
  2. Trading Systems Coding: System Design
  3. Trading Systems Coding: The Coding Stage
  4. Trading Systems Coding: The Coding Process
  5. Trading Systems Coding: Testing, Troubleshooting and Optimizing
  6. Trading Systems Coding: Using Your System
  7. Trading Systems Coding: Conclusion
RELATED TERMS
  1. Financial System

    A financial system can be defined at the global, regional or ...
  2. Forex System Trading

    A method of trading forex that is based on a series of analyses ...
  3. Alternative Trading System - ATS

    A trading system that is not regulated as an exchange, but is ...
  4. Customer Type Indicator Codes - CTI

    A system that uses four different codes to indicate the types ...
  5. Automatic Execution

    A method of executing trades without inputting them manually. ...
  6. Standard Industrial Classification - SIC Code

    A standard series of four-digit codes created by the U.S. government ...
RELATED FAQS
  1. How do I pick the best method for forex system trading?

    Discover how to identify the best type of forex system trading style for you based on your available time, your trading preferences ... Read Answer >>
  2. What is the difference between a capitalist system and a free market system?

    Learn about capitalist and free market systems, how these economic systems function and the main difference between capitalism ... Read Answer >>
  3. Why should I invest?

    One of the most compelling reasons for you to invest is the prospect of not having to work your entire life! Bottom line, ... Read Answer >>
  4. What are the key points when getting ready to file for unemployment aid?

    Before filing for unemployment aid, you must be unemployed, have worked in the past, lost the job through no your fault of ... Read Answer >>
  5. How can I improve my credit score?

    If you are looking to take out a loan or apply for a credit card, then it will be very important for you to have a good credit ... Read Answer >>
  6. How do I implement a Forex Signal System into a forex trading strategy?

    Learn how traders use different types of forex signal systems such as trend-based or range-based to create or supplement ... Read Answer >>
Hot Definitions
  1. Over-The-Counter - OTC

    Over-The-Counter (or OTC) is a security traded in some context other than on a formal exchange such as the NYSE, TSX, AMEX, ...
  2. Quarter - Q1, Q2, Q3, Q4

    A three-month period on a financial calendar that acts as a basis for the reporting of earnings and the paying of dividends.
  3. Weighted Average Cost Of Capital - WACC

    Weighted average cost of capital (WACC) is a calculation of a firm's cost of capital in which each category of capital is ...
  4. Basis Point (BPS)

    A unit that is equal to 1/100th of 1%, and is used to denote the change in a financial instrument. The basis point is commonly ...
  5. Sharing Economy

    An economic model in which individuals are able to borrow or rent assets owned by someone else.
  6. Unlevered Beta

    A type of metric that compares the risk of an unlevered company to the risk of the market. The unlevered beta is the beta ...
Trading Center