Ema Cross! - page 2

 

Take a Closer look

This EA seems to be great but if you look at the trades it makes in the backtester, you will see that it has many trades on the same minute.

I dont think you will find a broker that will allow you to run this EA.

Has anyone run this on a real account forward not the backtester?

I would like to hear how it is working out.

EK

 

EMA_cross money management

Hi

If the system is good, why not increase lot sizes as ones profits increase, or as ones accountbalance increases. I think it must be easy to write a function to determine the number of lots to buy that would equal say 2% of ones accout balance.

I have seen a 'money management' thread on forex-tsd but can't find it now.

But I don't even know how to determine the lot price - please help.

here is what I have so far..

int NumberlotsToTrade(int percentOfAcc)

{

//To return the number of lots that are to be traded that

// would equal a certain percentage of the account total (percentOfAcc)

int moneyavailable;

int lotMM;

int lotss;

lotss =1;

moneyavailable = Mathceil(AccountBalance( ) *(percentOfAcc/100)) ;

// I suppose it should actually be: moneyavailable = Mathceil(AccountFreeMargin() *(percentOfAcc/100));

lotMM = moneyavailable/(lotprice)

//how does one determine lot price for differentsymbols?

if (lotMM < 0.1) lotMM = Lotss;

if (lotMM > 1.0) lotMM = MathCeil(lotMM);

if (lotMM > 100) lotMM = 100;

return(lotMM);

}

[/CODE]

I have seen Alex.Piech.finGer do the the following - but I don't fully understand it.

I suppose it is better to use accountfreemagrin as this is AccountBalance minus Acountequity right?

Does the 10000 represent a micro account - would one change it on a normal account>

[CODE]

lotMM = MathCeil(AccountFreeMargin() * 50 / 10000) / 10; // 50 risk

if (lotMM < 0.1) lotMM = Lots;

if (lotMM > 1.0) lotMM = MathCeil(lotMM);

if (lotMM > 100) lotMM = 100;

Does anyone know of a good link where they explain: balance, equity, free Margin, Margin and Margin level. Thanks

when I started looking at forex I found the following for mini accounts.

setting lot size to 10.0 lots = 1 standard lot (1.0 lot or $100K lot)

setting lot size to 1.0 lots = 1 mini lot (0.1 lot or $10K lot)

setting lot size to 0.1 lots = 1 micro lot (0.01 lot or $1K lot)

setting lot size to 0.01 lots = 1 minimicro lot (0.001 lot or $100 lot).

So if I set lot size to 0.01 - when I trade, a trade will cost me $100 and if my account leverage is 100, then effectively the bank has traded $10000 in my name.

The more I look at it - the more confused i get. LOL

 

MST Results

Could you download my simple yet profitable EMA_CROSS and tell me what's the MST results on his machine?

Note:

The data you getting from the broker server while you are running your demo account is filled with gaps and missing a lot of real data. You can't relay on this data in your strategy testing. So you have to download a complete history data and import it to MetaTrader to have the opportunity to get more accurate results.

You need to have a complete data for all the timeframes available in MetaTrader (1 minute, 5 minutes, 15 minutes, 30 minutes, etc). But if you can get a complete 1 minute data it will be easy to use the Period_Converter script shipped with MetaTrader to convert the 1 minute data to all the other timeframes data.

The free and complete (from 16/06/2004 up-to-date) 1 minute data can be downloaded from Alpari Databank by following this link:

http://www.alpari-idc.com/en/dc/databank.php

 

Nice!!

Why not add a stop loss?

Or will it kill the system?

 

StopLoss

smeden:
Nice!!

Why not add a stop loss?

Or will it kill the system?

As you can notice in the strategy tester reports, there's no loss at all (I don't consider the last loss of type close at stopa loss).

I think there's no need for Stop Loss.

Attached is a version with a StopLoss and you can see how many losses the Expert had made?

 

hello codersguru,

Do you think that this last version would be enough stable to be really used?

 
BrunoFX:
hello codersguru, Do you think that this last version would be enough stable to be really used?

No, all the versions are for testing purpose only, no less no more.

 

Thanks you very much for sharing your result with us.

I think with a stop loss it is much better, because in your example you start with 1 lot at 10 000 and a leverage 100 which is quite high 10% of the account but as your profit increase you set it fixed.

The only thing I dont get are the space in between order, sometime it wont trave for 6 weeks, Ex:

2002.01.07 10:20 to 2002.03.21 00:00

I am going to test it at home also from 1 min alpari data from june 2004 and give some more feedback.

Thanks again

 

why not keep it at 10%

I personally don't think its a good system. It would be better just trading the cross of the price and the 80 ema - using the catfx50 system. Nobody is going to retire earning $60 000 in 6 years - you could though have some stunning vacations. If we can increase its profitability 10 times then we are talking. So we have got to rachet it up.

If the system is profitable why not keep it buying at 10% of the overall account. Which was the point of my previous post in this thread, about how to determine how to keep the system buying lots that would be a fixed percentage of the overall account, which nobody has replied to.

 

Hi Cardio,

I use this simple risk management function:

double GetSizeLot() { if (IsTesting() || IsDemo()) return(1);

else return(NormalizeDouble(AccountFreeMargin()/StopLoss*RiskLevel,1)); }

with

extern double RiskLevel = 0.03;

for a 3% risk e.g. in micro-accounts.

Take care.

Reason: