JLPi Grid EA - page 2

 

Hello, jlpi! Do you consider USD/JPY and JPY crosses mentioned in the code as the most convenient for trading with your EA?

 
Trader83:
Hello, jlpi! Do you consider USD/JPY and JPY crosses mentioned in the code as the most convenient for trading with your EA?

I have not tested so many pairs that I can definitively say which kind of pairs are the best, but I think that USDJPY is a good choice and probably the JPY crosses as well.

I think that pairs having a good profile for this strategy are either ranging or trending on a long term (like USDJPY did) but not so much for pairs that have very strong and sudden trends that are not sustained for long. So for instance I don't think that it will work so well for GBPUSD.

But of course it is just my opinion and it is worth to investigate further, because maybe the tests can demonstrate otherwise

 

Hello,

This is great Jlpi, for once a grid EA that makes sense, and that is not pretentious with ridiculous short interval.

I have been trying to back test and I realised a couple of things:

1) To do some trade in backtest I needed at least 10 000 $ to start with as the calculation of Lots is done this way:

Lots = MathRound(AccountFreeMargin()*Risk/100)/100;

=> so with less than 10 000 the Lots is going to be less than 0.1 and it is not going to trade coz of these lines:

if (Lots < 0.1)

return(0);

Also I had issue in backtest and the error

"ERR_INVALID_TRADE_VOLUME 131 Invalid trade volume" came up.

That is when I realised that in my broker (MIG) I was allowed only multiple of 0.1 Lot but the Lot size was 0.11.

So for those that get this error I suggest to change the line:

Lots = MathRound(AccountFreeMargin()*Risk/100)/100;

To

Lots = MathRound(AccountFreeMargin()*Risk/1000)/10;

Because it is rounding to the nearest integer and then it is dividing by 10 it will ensure that it is a multiple of 0.1. This is obvisouly for brokers that do not allow 0.01 Lots.

Keep up the good work.

Thanks

Sunwest

 
sunwest:
Hello,

This is great Jlpi, for once a grid EA that makes sense, and that is not pretentious with ridiculous short interval.

I have been trying to back test and I realised a couple of things:

1) To do some trade in backtest I needed at least 10 000 $ to start with as the calculation of Lots is done this way:

Lots = MathRound(AccountFreeMargin()*Risk/100)/100;

=> so with less than 10 000 the Lots is going to be less than 0.1 and it is not going to trade coz of these lines:

if (Lots < 0.1)

return(0);

Also I had issue in backtest and the error

"ERR_INVALID_TRADE_VOLUME 131 Invalid trade volume" came up.

That is when I realised that in my broker (MIG) I was allowed only multiple of 0.1 Lot but the Lot size was 0.11.

So for those that get this error I suggest to change the line:

Lots = MathRound(AccountFreeMargin()*Risk/100)/100;

To

Lots = MathRound(AccountFreeMargin()*Risk/1000)/10;

Because it is rounding to the nearest integer and then it is dividing by 10 it will ensure that it is a multiple of 0.1. This is obvisouly for brokers that do not allow 0.01 Lots.

Keep up the good work.

Thanks

Sunwest

Thank you for this nice comments

You are right. You need $10 000 and it was meant for brokers allowing 0.01 lots.

I guess that I could set a parameter to choose either 0.01 or 0.1 for lots intervals.

 

Yes Brilliant idea jlpi.

It will benefit a lot of people as many brokers do not allow 0.01 Lot

Cheers,

Sunwest

 
sunwest:
Yes Brilliant idea jlpi.

It will benefit a lot of people as many brokers do not allow 0.01 Lot

Cheers,

Sunwest

OK it's done. You will find the new version in the first post with a new parameter MicroLots to tell if you want microlots (0.01) or not .

jlpi

 

nice work, so presumably this will now work on an Interbank mini?

 

jlpi, don't you think that using 0.01 lot on 10k account is really conservetive, as the return will be about 1% per month? But it will be quite safe....

 

results?

Anybody trading this have results they can please share?

 
Trader83:
jlpi, don't you think that using 0.01 lot on 10k account is really conservetive, as the return will be about 1% per month? But it will be quite safe....

In fact I use 0.1 lot as a minimum. but it is also conservative. I think such kind of EA needs to be conservative because there is always a risk of wipping the account. So in my opinion it is better to play safe. Anyway you can modify the Risk parameter and try with more risk.

Reason: