Trend Trading EA with Automated Loss Recovery

Post your EA's using ALR here
Post Reply
User avatar
SpiderX
Trader
Posts: 554
Joined: Thu Aug 22, 2013 4:50 pm

Trend Trading EA with Automated Loss Recovery

Post by SpiderX »

Dewey McG » Fri Jul 18, 2014 6:14 am wrote:
Sorry to take so long--schedule has been crazy. The trade logic seems fine--it's the lot sizes. The calculations are a tad off, so the additional ALR trades are slightly smaller than they should be
Can you check that this matches lot calculation in spread sheet 2.2 with your set ?

Cheers
"Love is patient, love is kind. It does not envy, it does not boast, it is not proud. It does not dishonor others, it is not self-seeking, it is not easily angered, it keeps no record of wrongs.Love does not delight in evil but rejoices with the truth. It always protects, always trusts, always hopes, always perseveres."
-Corinthians 13:4-8
Dewey McG
Trader
Posts: 435
Joined: Sat Nov 26, 2011 4:20 pm
Location: Tampa FL

Trend Trading EA with Automated Loss Recovery

Post by Dewey McG »

SpiderX » Thu Jul 17, 2014 6:29 pm wrote:
Dewey McG » Fri Jul 18, 2014 6:14 am wrote:
Sorry to take so long--schedule has been crazy. The trade logic seems fine--it's the lot sizes. The calculations are a tad off, so the additional ALR trades are slightly smaller than they should be
Can you check that this matches lot calculation in spread sheet 2.2 with your set ?

Cheers
2.2--which I don't understand because the settings are different than mine, has a series of .1, .14, .1. .14... If the EA matched that it would be .25, .35, .25... Instead it was .25, .34, .21
User avatar
SpiderX
Trader
Posts: 554
Joined: Thu Aug 22, 2013 4:50 pm

Trend Trading EA with Automated Loss Recovery

Post by SpiderX »

Dewey McG » Fri Jul 18, 2014 8:38 am wrote:
2.2--which I don't understand because the settings are different than mine, has a series of .1, .14, .1. .14... If the EA matched that it would be .25, .35, .25... Instead it was .25, .34, .21
Hi Dewey,

Can you check the following spreadsheet ?
http://www.stevehopwoodforex.com/phpBB3 ... =50#p95946

Input your settings in, the lot sizes taken by the EA should be the same as the ones in the new spreadsheet, which adjusts for Min Lot.
If the lot sizes are different from the spreadsheet, then it is an EA calculation mistake.

If lot sizes are same, then the next things to check:
-are orders filled exactly at the entryprices and sl, tp or is there a small difference ?

if the orders are filled exactly, then the final possibility...
-are the formulas in the spreadsheet correct ?

Cheers
"Love is patient, love is kind. It does not envy, it does not boast, it is not proud. It does not dishonor others, it is not self-seeking, it is not easily angered, it keeps no record of wrongs.Love does not delight in evil but rejoices with the truth. It always protects, always trusts, always hopes, always perseveres."
-Corinthians 13:4-8
Dewey McG
Trader
Posts: 435
Joined: Sat Nov 26, 2011 4:20 pm
Location: Tampa FL

Trend Trading EA with Automated Loss Recovery

Post by Dewey McG »

SpiderX » Thu Jul 17, 2014 8:49 pm wrote:
Hi Dewey,

Can you check the following spreadsheet ?
http://www.stevehopwoodforex.com/phpBB3 ... =50#p95946

Input your settings in, the lot sizes taken by the EA should be the same as the ones in the new spreadsheet, which adjusts for Min Lot.
If the lot sizes are different from the spreadsheet, then it is an EA calculation mistake.

If lot sizes are same, then the next things to check:
-are orders filled exactly at the entryprices and sl, tp or is there a small difference ?

if the orders are filled exactly, then the final possibility...
-are the formulas in the spreadsheet correct ?

Cheers
OK, this is going to take a while--will be the weekend probably before I have an answer
User avatar
SpiderX
Trader
Posts: 554
Joined: Thu Aug 22, 2013 4:50 pm

Trend Trading EA with Automated Loss Recovery

Post by SpiderX »

Hi Dewey,

Got the answer after looking again.

For first 2 orders
buyprice: 190.368 close: 188.368 pips:-200 lot:(0.25) pipx lot: -50
sellprice: 189.868 close: 188.426 pips:144.2 lot:(0.34) pipx lot: 49.028

Overall: -0.972 pip.lot

Second order didnt close at the tp.

If it closed at tp:

pips:-200 lot:(0.25) pipxlot: -50
pips:150 lot:(0.34) pipxlot: 51

Overall : +1 pip.lot

Calculation should be correct.
Issue is that recovery trades did not close at tp, maybe that is something that has to be accounted for.

Cheers
"Love is patient, love is kind. It does not envy, it does not boast, it is not proud. It does not dishonor others, it is not self-seeking, it is not easily angered, it keeps no record of wrongs.Love does not delight in evil but rejoices with the truth. It always protects, always trusts, always hopes, always perseveres."
-Corinthians 13:4-8
Dewey McG
Trader
Posts: 435
Joined: Sat Nov 26, 2011 4:20 pm
Location: Tampa FL

Trend Trading EA with Automated Loss Recovery

Post by Dewey McG »

I am seeing that your version of the calculator does not match up with mine. The inputs are the same but the numbers for lot sizes are not
You do not have the required permissions to view the files attached to this post.
User avatar
SpiderX
Trader
Posts: 554
Joined: Thu Aug 22, 2013 4:50 pm

Trend Trading EA with Automated Loss Recovery

Post by SpiderX »

Dewey McG » Fri Jul 18, 2014 10:34 am wrote:I am seeing that your version of the calculator does not match up with mine. The inputs are the same but the numbers for lot sizes are not

Hi Dewey,

Maybe you can counter check the formula...but i account for min lot step, which is more realistic...because EA cant take odd lots.
As a result, all the lot sizes are different.
The change to your excel code was only to step up the size to the next lot step.
It was a simple change in the formula. you can verify if any mistake was made in my spreadsheet with regards to this.

cheers
"Love is patient, love is kind. It does not envy, it does not boast, it is not proud. It does not dishonor others, it is not self-seeking, it is not easily angered, it keeps no record of wrongs.Love does not delight in evil but rejoices with the truth. It always protects, always trusts, always hopes, always perseveres."
-Corinthians 13:4-8
Dewey McG
Trader
Posts: 435
Joined: Sat Nov 26, 2011 4:20 pm
Location: Tampa FL

Trend Trading EA with Automated Loss Recovery

Post by Dewey McG »

SpiderX » Thu Jul 17, 2014 10:37 pm wrote:
Hi Dewey,

Maybe you can counter check the formula...but i account for min lot step, which is more realistic...because EA cant take odd lots.
As a result, all the lot sizes are different.
The change to your excel code was only to step up the size to the next lot step.
It was a simple change in the formula. you can verify if any mistake was made in my spreadsheet with regards to this.

cheers
I will--but that is the time consuming chart. Need to head to bed now, but will look over this over the next couple days unless it hits me very quickly--which I suspect it won't
User avatar
SpiderX
Trader
Posts: 554
Joined: Thu Aug 22, 2013 4:50 pm

Trend Trading EA with Automated Loss Recovery

Post by SpiderX »

Dewey McG » Fri Jul 18, 2014 10:40 am wrote:
I will--but that is the time consuming chart. Need to head to bed now, but will look over this over the next couple days unless it hits me very quickly--which I suspect it won't
Actually you can try the changes for yourself...all i added was a CEILING( xxxxxx , MIN_LOTSTEP) to each lot size in the sheet.
That is all.
For Target profit, we may need to convert it a Pip Profit per lot to rectify the issue that we see above, so we give a buffer for some slippage and trade being closed away from tp.
My opinion is that lot sizes are calculated correct, issue is due to trade not being closed at tp.

Cheers
"Love is patient, love is kind. It does not envy, it does not boast, it is not proud. It does not dishonor others, it is not self-seeking, it is not easily angered, it keeps no record of wrongs.Love does not delight in evil but rejoices with the truth. It always protects, always trusts, always hopes, always perseveres."
-Corinthians 13:4-8
Dewey McG
Trader
Posts: 435
Joined: Sat Nov 26, 2011 4:20 pm
Location: Tampa FL

Trend Trading EA with Automated Loss Recovery

Post by Dewey McG »

SpiderX » Thu Jul 17, 2014 10:43 pm wrote:
Actually you can try the changes for yourself...all i added was a CEILING( xxxxxx , MIN_LOTSTEP) to each lot size in the sheet.
That is all.
For Target profit, we may need to convert it a Pip Profit per lot to rectify the issue that we see above, so we give a buffer for some slippage and trade being closed away from tp.
My opinion is that lot sizes are calculated correct, issue is due to trade not being closed at tp.

Cheers
Can you explain exactly what the CEILING function does?

Thanks
Post Reply

Return to “Automated Loss Recovery”