Can some1 please help - Simple trading strategy programming

 

Is there someone who could kindly assist:

I do not know any MQL programming language, but I see there are some real fundies here...please excuse my ignorance!

I have loaded MQL4 on my pc through Tradexfx futures, but am struggling to get around basic programming.

I am trying to optimise the return on a simple trading strategy of using 2 exponential moving average cross-overs to trigger entries and exits on the GBPUSD.

By simply changing the EMA parameter periods, I could then re-run the routine to get best results of say 1 year's data.

I'm not even sure if such a trading system is efficient and sustainable in all market conditions, but I think by altering the periods, one would get an acceptable result?

If someone could assist, I would be most grateful!

 
cordin:

one would get an acceptable result?

Anyone can get an acceptable result on history. What's the point?
On the history you always know where to sell and where to buy anyway without changing the parameters.
 
Irtron:
cordin:

one would get an acceptable result?

Anyone can get an acceptable result on history. What's the point?
On the history you always know where to sell and where to buy anyway without changing the parameters.

Irtron wrote:

cordin:

one would get an acceptable result?

Anyone can get an acceptable result on history. What's the point?
On the history you always know where to sell and where to buy anyway without changing the parameters.
 
cordin:
Irtron:
cordin:

one would get an acceptable result?

Anyone can get an acceptable result on history. What's the point?
On the history you always know where to sell and where to buy anyway without changing the parameters.

Irtron wrote:

cordin:

one would get an acceptable result?

Anyone can get an acceptable result on history. What's the point?
On the history you always know where to sell and where to buy anyway without changing the parameters.

 

Sorry, my message request was cut in half here:

Irtron, what I'm after is to try and measure the profit/loss results from a finite time period for several EMA crossover settings, say 1 year, so as to calculate the best settings for a particular tradable instrument.

Since I know nothing about programming with this tool, I am forced to use Excel to to it manually and of course Excel can not be connected to an ATS.

 
Have you wrote an EA and do backtest on it? you could change your ema setting and backtest it repeatly to find your best setting.
 
devilian1899:
Have you wrote an EA and do backtest on it? you could change your ema setting and backtest it repeatly to find your best setting.

Hi d, I have no experience writing EA's, have no experience with programming and I'm still trying to learn the syntax for it.
 

Hi d, I have no experience writing EA's, or with any programming and I'm still trying to learn the syntax for it. I was just lookig for a quicker solution to this analysis and hoping that someone here may have written something very similar already. It should be a very simple routine: enter and exit trades continuously on the closing price of the first bar following an EMA pair crossover, win or lose and calculate even just the pips made or lost over an annual period. So far I've projected 2 months data done on Excel and I'm getting something rediculous like 800 pips (net profit) per annum!? - translates, in South Africa after tax, to +/-59000% pa on the entire account start value...sounds insane, yes, but could it be; cannot find the error of my thinking, 'cos its surely all possible in practice?

 
cordin:

on the closing price of the first bar following an EMA pair crossover


This might be a trap you got in with your excel calculations. Following crossover means that the trade occurs two bars after the factual crossing. Does the spreadsheet takes that into account?

The system you're up to is pretty similar to MACD_Sample provided in standard MT distribution package.
However you may want to contact me if you don't mind spending you wages this way.
 
Irtron:
cordin:

on the closing price of the first bar following an EMA pair crossover


This might be a trap you got in with your excel calculations. Following crossover means that the trade occurs two bars after the factual crossing. Does the spreadsheet takes that into account?

The system you're up to is pretty similar to MACD_Sample provided in standard MT distribution package.
However you may want to contact me if you don't mind spending you wages this way.


Hmmm, haven't taken that into account, but the basic principle should still work - remember also that in more than half the entry and exit cases, you're probably entering on the worst spot, 'cos its the first signal of a turnaround, the second bar after the crossover may have been a better entry on a wipsaw action; I've noticed this a lot on charts. This is actually a very inefficient system and very simpl, but look how profitable! It would be a trivial setback compared to the overall trend result. I am just a novice looking for answers though! But seriously, can someone tell me why this shouldn't work? Hell, the return rate is far too high anyway, throw some money away in an attempt to make it look more "acceptable". Know anyone that makes 590 times their money back every year?

 
cordin:
Irtron:
cordin:

on the closing price of the first bar following an EMA pair crossover


This might be a trap you got in with your excel calculations. Following crossover means that the trade occurs two bars after the factual crossing. Does the spreadsheet takes that into account?

The system you're up to is pretty similar to MACD_Sample provided in standard MT distribution package.
However you may want to contact me if you don't mind spending you wages this way.


Hmmm, haven't taken that into account, but the basic principle should still work - remember also that in more than half the entry and exit cases, you're probably entering on the worst spot, 'cos its the first signal of a turnaround, the second bar after the crossover may have been a better entry on a wipsaw action; I've noticed this a lot on charts. This is actually a very inefficient system and very simpl, but look how profitable! It would be a trivial setback compared to the overall trend result. I am just a novice looking for answers though! But seriously, can someone tell me why this shouldn't work? Hell, the return rate is far too high anyway, throw some money away in an attempt to make it look more "acceptable". Know anyone that makes 590 times their money back every year?