Codes

Spread Data Logger for MetaTrader 4

Collect and analyze real-time spread data

Forum

Importing a library via user external input - can it be done??

Hi, Im trying to find a way to import a library (or .dll file) with the filename being defined externally. For example, this is what I am trying to accomplish: User creates a file " MY_FILE.mq4" ( " MY_FILE.ex4" after compiling), saving it in the libraries folder. User runs my EA, "

Metatrader-EA API

Does anyone know how metatrader interfaces with an EA? I do not have a strong background in windows API but I do have concept of how it works. Im particularly interested in what happens when you click 'Expert Properties ' in the tester... MT4 obviously reads the extern variables and opens up the

Forex.com screws EA traders (allegedly)

Ive been a client with this broker for some time and pretty happy.. until now. They decided to replace 'instant' orders with 'market' orders.. whats the difference you ask? Well an instant order allows you to preset all of your order parameters (stoploss, takeprofit) and send that order using the

Quick Syntax Question

So some syntax in an EA from the code base I didnt understand: for (i= 0 ;i<K;i++) if (i% 2 == 0 ) What does the "%" inside the if-statement mean

Hardware for Optimization

For the purposes of EA development/testing , Im using my Macbook Pro 2.53Gigs/4GB RAM.. I've got Windows 7 running on a virtual machine and all I ever use it for is running metatrader...works very well for the most part except when running backtests & optimizing, it is time-consuming to a point I

Control Points backtesting model

The drop-down menu in the tester terminal describes the control points model as "a very crude method based on the nearest less timeframe". What exactly does that entail? How does it work? Comparing results via the 'every tik' model and control points, I see very little discrepancy

initializing non-static variables inside init()

Suppose I have the following code: //... global scope int var ; int init() { //... var = 3 ; //... } int start() { //... Print( "var = " , var ); //... } the output each time start() runs is "var = 3" why?? If I did not declare var as static the memory partition where 'var' is stored should be

Z-Score Computation

In this article, https://www.mql5.com/en/articles/1492 , the author present the following method of computing Z-Score. Z=(N*(R-0.5)-P)/((P*(P-N))/(N-1))^(1/2) where: N - total amount of trades in a series; R - total amount of series of profitable and losing trades; P = 2*W*L; W - total amount of

"Is this profit worth this drawdown?"

Looking at some optimization results , I asked myself the question: Is this profit worth this drawdown? Placing the results into a spreadsheet I figured a simple ratio of drawdown (in cash) to cash profit would more meaningfully describe which result is actually optimal. Thus, a ratio of 1 means

What is your personal drawdown tolerance?

Just wanted to get an idea of what others consider to be an unacceptable drawdown. To me, when I look at a testing result, anything above ~20% is a deal breaker, however, losing even 20% of your account, I would imagine, would be psychologically traumatizing.. I think I would find it hard to stick