Archive for the ‘MT4’ Category

Ten Reasons Why Out of Sample Trading System Performance May Be Worse than In Sample Performance

Why do trading systems tend to perform worse on new data?

This is the question so many trading system developers ask. The answer is that there are many reasons why test performance may be much better than live trading results.

Ten Reasons Out of Sample Performance May Be Worse Than In Sample Trading System Performance


Sample Code to Export C# DLL to Metatrader

September 3, 2012 Leave a comment

Have you ever wanted to write a C# DLL for Metatrader? Sample code shows how to create the DLL in C# and how to call that DLL from within Metatrader 4.

Sample code is included in a downloadable Visual Studio project for writing a C# DLL that can be called from Metatrader, just as a C DLL. Check it out.

Code to Export C# DLL to Metatrader


Close All Open Orders Script All Symbols in Profit

If you’re looking for a way to close all open orders in MT4 script for open profits, check this out.

Close All Open Orders Script All Symbols in Profit

Pairs Trading MT4 Indicator – Market Formula = Forex Trader + Metatrader

Pairs Trading MT4 Indicator – Market Formula = Forex Trader + Metatrader.

Simple pairs trading indicator for Metatrader 4 named Pairs with Beta for analyzing currency pair spreads. Allows custom multipliers (beta) to be used with the two pairs being analyzed, then plots the spread in a sub window.

For instance if EURUSD and GBPUSD are the two pairs being studied, and the beta for GBPUSD is 1.4, then the following formula would be plotted:

EURUSD * 1.0 – GBPUSD * 1.4 (shown below in dodger blue).

Pairs Trading MT4 Indicator - Market Formula = Forex Trader + Metatrader

How To Write a C# DLL for Metatrader

August 3, 2011 12 comments

C# developers who previously were unable to write DLLs for Metatrader may now do so using a particular development strategy.

MQL4 Forex Trading Function Reference With Sample Code

Have you ever wanted to learn about the MT4 forex trading functions without needing to learn Russian? In this series all MQL4 trading functions are described in detail. MQL4 trading functions are broken down by functional category, including the most important functions: OrderSend, OrderModify, OrderClose, OrderSelect as well as the many other important and useful trading functions and constants. Sample code is provided by category, including functional routines that may be dropped directly into your code for OrderSend, OrderClose and OrderModify – three of the hardest to implement functions in MQL4.

MQL4 Trading Functions Lists all MQL4 trading functions alphabetically and by functional category.

MQL4: OrderClose, OrderCloseBy, OrderDelete, OrderModify, OrderSend

MQL4: OrderSelect, OrdersHistoryTotal and OrdersTotal

MQL4: Specific Order Information  Includes reference for MQL4 functions:

How To Set Up Metatrader For Expert Advisor Live Trading

Sometimes the simplest things in MT4 can be the most challenging. After attaching an expert advisor to a Metatrader chart, how do you get it to start taking live trades? Read this article and find out step by step how to set up the MT4 terminal for live expert advisor trading.

How to set up Metatrader for Expert Advisor live trading