User Tools

Site Tools


metatrader_-_quick_primer

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
metatrader_-_quick_primer [2016/12/14 10:11]
tickstory
metatrader_-_quick_primer [2016/12/14 20:48]
tickstory
Line 2: Line 2:
    
 This section describes some of the details you may need to know in order to produce Metatrader exports effectively. ​ If you are familiar with the way in which MT4 works, you can go straight to the section on MT4 [[metatrader_backtesting_guide|Backtesting Quick Start Guide]] that will get you performing 99% back-tests quickly. This section describes some of the details you may need to know in order to produce Metatrader exports effectively. ​ If you are familiar with the way in which MT4 works, you can go straight to the section on MT4 [[metatrader_backtesting_guide|Backtesting Quick Start Guide]] that will get you performing 99% back-tests quickly.
- + 
 +====== The MT4 Strategy Tester ====== 
 + 
 +MT4 has the ability to write an test custom trading strategies in the form of computer programs known as "​Expert Advisors"​ (EAs). ​ EAs essentially allow the specification of a computer program that allows it to place trades with your broker - in a totally autonomous fashion, if need be.  EAs are often sold via various platforms such as Metatrader'​s online store. ​ EAs can also be written by users to test their own strategies. ​ EA code is written in a language called MQL which will look familiar to programmers who know the '​C'​ Programming Language. ​ An example of this code is provided in the standard MT4 installation called "​Moving Average EA"​. ​ This EA demonstrates a very basic strategy that opens and closes trades when a moving average cross-over occurs. 
 + 
 +Of course, having provided the ability to //create// EAs, Metatrader also provides the ability to //test// them to see how they perform through a process called "​back-testing"​. ​ Back-testing is simply running an EA through a chronological sequence of historical data to see how the EA would have traded - and ultimately performed - in past market conditions. ​ The Metatrader Strategy Tester is this back-testing tool and it is already installed as part of the standard Metatrader package. 
 + 
 +You can show the Strategy Tester by going to Metatrader'​s //​View//​->//​Strategy tester// option. ​ A screen similar to the one shown below will appear. 
 + 
 +{{:​pasted:​20161214-150500.png}} 
 + 
 +It is out of scope of this document to provide a full explanation of the functionality of the Strategy Tester. ​ There is a breadth of information in Metatrader'​s own Help manual and also online forums to assist you further. 
 + 
 +===== Broker 1-Minute Data Versus Tickstory'​s Data ===== 
 + 
 +In normal operation, the Strategy Tester sources its historical data from your broker. ​ This broker data is often reputed to be full of gaps and not complete for the purposes of the back-test. ​ Not to mention that even if it were complete, the most granular information that is contained is 1-Minute. ​ This means that from a composition of many ticks that typically occur in a single minute, the testing only caters for the Open, High, Low and Close of the 1-minute bar.  As you can imagine, this is unlikely to yield an accurate assessment of an EA that trades often or is dependent on small price movements. 
 + 
 +Enter Tickstory. ​ Tickstory allows you to generate a tick-by-tick historical database that is used by the Strategy Tester. ​ This allows you to back-test your EA with more granularity and this can enhance your assessment of your strategy. ​ Not only this, but Tickstory also generates complete charts from this data which means that when you display your bar charts within Metatrader, they will be much more reliable and complete. 
 ====== The MT4 Database ====== ====== The MT4 Database ======
    
metatrader_-_quick_primer.txt · Last modified: 2020/04/29 06:36 (external edit)