Automatic Loss Recovery System (ALR) - read this first

Post your EA's using ALR here
Post Reply
Dewey McG
Trader
Posts: 435
Joined: Sat Nov 26, 2011 4:20 pm
Location: Tampa FL

Automatic Loss Recovery System (ALR)

Post by Dewey McG »

kotsh » Sat Jun 28, 2014 4:51 am wrote:So is anyone interested in writing some initial version for this EA? Dewey?
I have asked people to hold off until we nail down the numbers. I think we are almost there. Look for my PM as I need an adjustment on your spreadsheet.
Dewey McG
Trader
Posts: 435
Joined: Sat Nov 26, 2011 4:20 pm
Location: Tampa FL

Automatic Loss Recovery System (ALR)

Post by Dewey McG »

While I am waiting for one last thing from Klotsh to finish the tweaking so I can ask people to program this I thought I would throw in a bonus. I want everyone to see how powerful this is when coupled with a good strategy.

Play with this on a pair with high volatility. I used EURNZD for my example on a H4 chart. Use a 240 LWMA for trend direction. Only trade with the trend. If you are in an uptrend wait for MACD to cross below the 0 line, then open a buy when price crosses and closes above the 5 EMA shift 5. Use 150 TP. Close when price hits TP or when it closes below the 5 EMA shift 5 as long as the trade is in profit. Do not close if it isn't. If price moves 50 pips against you then start your ALR sequence--turn on 50 pip moves and take TP at 150. Every trade either hits profit or just above break even. The most ALR turns I could see was 3.

If you use the template all the trade lines are drawn in so you can follow along. I just don't see how this can lose using a decent strategy on a high volatility pair.
You do not have the required permissions to view the files attached to this post.
garyfritz

Automatic Loss Recovery System (ALR)

Post by garyfritz »

Dewey McG » Thu Jun 26, 2014 10:16 pm wrote:We are not opening any more ALR trades after 10 trades. This means the chances of it hitting a full SL are .4 (the odds we miss on the initial trade) * .75^9 (75% to the power of 9). This equals 3.0034% (we’ll say 3% to make the numbers simple)

This means over 1000 trades we would hit a full stop loss 30 times.

Our profits for the winning trades would be .11 (the initial lot size at 3%) times 60 pips = $66.67 per trade.
Our losses for the losing trades would be $600. You might be thinking yikes! That’s roughly 10:1 risk to reward against us, but that is the wrong way of looking at it. We only hit SL 3% of the time and hit a profit 60% of the time. What about the other trades? That is what ALR is for. They all show a small profit. I won’t even factor that in for now because we also need to allow for costs, so they should be about a wash.
OK, here's a table that calculates that. It's the same as the spreadsheet I posted before, so the "Total Trade P/L" field shows the result of hitting the TP after that turn -- except the last line shows the result of taking the SL and quitting. TP = 60, SL = 20, first trade has 60% win probability, subsequent ALR turns have 25% win probability.

My earlier calcs had an error. It's not exactly zero-profit. But I think it's still very low-profit.

Here's a 10-turn example, with the exposure slowly decreasing to zero:
ALR6.gif
So we trade almost 1.1 full lots in 10 trades and end up with a profit of 2.80, before costs. And since the original trade made 3.60, that means the ALR trades LOST money overall, before counting costs.

wealthmaster posted some of Dustin's numbers. Here's a table with those numbers:
ALR7.gif
Interestingly enough, it's still 2.80 profit! Same with my minimal-profit-per-turn numbers:
ALR8.gif
I found that ***ANY*** combination of trade sizes on the 8 turns produced the EXACT SAME profit. Each turn's profit is different, but the total always adds up to 2.80. Which makes absolutely NO sense to me, but that's what the numbers say. As far as I can tell, my spreadsheet is right.

So these results say it doesn't matter how you juggle the ALR size parameters. It all works out the same in the end. Overall, over the long haul, the ALR trades LOSE money, BEFORE costs. You're better off not doing the ALR trades at all.
You do not have the required permissions to view the files attached to this post.
Dewey McG
Trader
Posts: 435
Joined: Sat Nov 26, 2011 4:20 pm
Location: Tampa FL

Automatic Loss Recovery System (ALR)

Post by Dewey McG »

Gary please walk me through how you get your numbers because I am missing something. First of all shouldn't the turn 1 profit be 10 times what you have? 60 pips times .1 lots would be $60 not $6.

Using Klotsh' spread sheet, I can figure trade sizes to allow for spread and a small profit for each turn so that ANY combination will result in a larger profit (60 pips) or a small profit just above break even to cover costs (swap and commissions since spread is now accounted for).

My numbers seem simple:

Gross Profit = 66.67 times 600 = $40,000
Gross Loss = 600 times 30 = -18,000

Net Profit = $22,000

Profit factor = 2.22.

Please tell me where I made a mistake and what would be wrong with those numbers.

I am almost ready to ask for an EA, then we can do backtests using large samples to see if my theory holds water. I suspect that if coupled with the right type of strategies this will do even better.

Also, please know I welcome your comments and that I believe a vigorous debate helps us all.
garyfritz

Automatic Loss Recovery System (ALR)

Post by garyfritz »

Dewey McG » Sat Jun 28, 2014 4:02 pm wrote:Gary please walk me through how you get your numbers because I am missing something. First of all shouldn't the turn 1 profit be 10 times what you have? 60 pips times .1 lots would be $60 not $6.
True. Careless of me. I just multiplied 60 times the 0.1 lot size. And I did that consistently throughout the table. The results are still the same, just 10x bigger. I fixed that error in the attached spreadsheet.
My numbers seem simple:
Please tell me where I made a mistake and what would be wrong with those numbers.
Not sure. I'll have to look at Klotsh's spreadsheet. I wonder if it accounts for all the cases of losses, i.e. all the time you TP after 1, 2, 3, ... N turns?

Or maybe I have an error in MY spreadsheet. See if you see any errors here. Explanation is in the spreadsheet.

According to these calculations, **IF** you consider all the cases that can happen AND their probabilities, the ALR trades **ALWAYS** lose money in the long run, without even counting costs. The net profit of the whole ALR is less than the net profit of the original trade. If you set up the sizes right, then in the short term you might show a profit. But in the long run it's a loser.

In If this is right, you are ALWAYS better off to just take the loss instead of trying to magick it away with ALR.
You do not have the required permissions to view the files attached to this post.
Dewey McG
Trader
Posts: 435
Joined: Sat Nov 26, 2011 4:20 pm
Location: Tampa FL

Automatic Loss Recovery System (ALR)

Post by Dewey McG »

garyfritz » Sat Jun 28, 2014 7:57 pm wrote:
According to these calculations, **IF** you consider all the cases that can happen AND their probabilities, the ALR trades **ALWAYS** lose money in the long run, without even counting costs. The net profit of the whole ALR is less than the net profit of the original trade. If you set up the sizes right, then in the short term you might show a profit. But in the long run it's a loser.

In If this is right, you are ALWAYS better off to just take the loss instead of trying to magick it away with ALR.
Ok--finally I see what you mean, though I do not agree with all your conclusions. It's late and I will try to give a more detailed response tomorrow.
garyfritz

Automatic Loss Recovery System (ALR)

Post by garyfritz »

You know what? *I* don't agree with all my conclusions either!! :lol:

I just realized I was looking for the ALR to show a profit. But you have to compare it against what you would get without ALR, which is always a loss. E.g. if you win 60% of the time with a 60 TP / 20 SL, then you either win 60 or lose 20. Your long-run return is 0.60*60 - 0.40*20 = 28. The TP win contributes +36, the SL loss costs -8. So if you can get more than -8 out of the ALR, you're ahead.

However... in the tables I posted, the win contributed 28 and the ALR, all together, contributed... -8.

So as far as I can tell, there is zero net gain from the ALR, and additional costs. So I still think it doesn't make sense.
Dewey McG
Trader
Posts: 435
Joined: Sat Nov 26, 2011 4:20 pm
Location: Tampa FL

Automatic Loss Recovery System (ALR)

Post by Dewey McG »

garyfritz » Sun Jun 29, 2014 12:41 am wrote:You know what? *I* don't agree with all my conclusions either!! :lol:

I just realized I was looking for the ALR to show a profit. But you have to compare it against what you would get without ALR, which is always a loss. E.g. if you win 60% of the time with a 60 TP / 20 SL, then you either win 60 or lose 20. Your long-run return is 0.60*60 - 0.40*20 = 28. The TP win contributes +36, the SL loss costs -8. So if you can get more than -8 out of the ALR, you're ahead.

However... in the tables I posted, the win contributed 28 and the ALR, all together, contributed... -8.

So as far as I can tell, there is zero net gain from the ALR, and additional costs. So I still think it doesn't make sense.
Let's see if I can explain this. You would only be right if everything remained static, i.e. the market always gave you a the same probability of hitting your TP and that the odds of hitting TP on subsequent ALR trades remained at 25%. However, this ignores how markets actually work. They go through periods of accumulation, consolidation and redistribution. As long as the markets move I KNOW ALR will get me out with BE or a small profit if my settings are adjusted correctly because the only way I will hit a SL is if the market continues to chop indefinitely. If I am wrong, I can use ALR to keep my risk at a predefined level (I would never use more than 2%), but I can feel confidant that it is even less likely to happen than the formula I used (10 turns with an initial TP win rate of 60% would give a 3% chance of Stop Loss) because of the way the market works. I am sure there must be a way to factor in the odds of a pair ranging for X number of turns based on that pair's volatility to prove my point, but I am not sure how to do it.

The PIC of the GBPJPY on a H4 chart might help. I showed a 200 pip move which is rather small compared to the how far up and down the pair moves. If I use a 150 pip tp and 50 pip ALR then all I need is for the market to eventually move at least 150-200 pips either way within 10 turns and I MAKE A PROFIT. If we use higher volatility pairs the odds of going 10 turns without a TP become far less than 3%. We have all seen strategies that worked well for a period of time and then failed, but with ALR I WON'T LOSE UNLESS THE MARKET STOPS. Even if that unlikely event occurs, it won't blow my account like a martingale, but will only cost me the 2% I risked.

What I expect will happen is that when we use ALR with a sound strategy (like the one I posted) on higher volatility pairs is that we simply will not see any stop losses hit if we set ALR to 10 turns. Want to make it even more secure? Use volume as a filter and only take trades when the volume is above average because stalls won't happen if volume is increasing.

This will be an example of when back tests will help by comparing large amounts of data on volatile pairs with static probabilities we have been using that don't take into account how the market works.

If any math wizards can tell me how to factor in the market's volatility to help determine the probability of hitting SL then please chime in.
You do not have the required permissions to view the files attached to this post.
Dewey McG
Trader
Posts: 435
Joined: Sat Nov 26, 2011 4:20 pm
Location: Tampa FL

Automatic Loss Recovery System (ALR)

Post by Dewey McG »

Update will be in post 1. Revised ALR calculator including Klotsh's formulas so you can add in spread and I fixed a few minor bugs
You do not have the required permissions to view the files attached to this post.
Dewey McG
Trader
Posts: 435
Joined: Sat Nov 26, 2011 4:20 pm
Location: Tampa FL

Automatic Loss Recovery System (ALR)

Post by Dewey McG »

I am sure everyone by now is eager to see an EA for this. We actually need two plus a shell EA. One would be a trade manager that could be used with any strategy. The second EA would be one coupled with an existing strategy ( I would recommend the one I mentioned in a previous post because I think it would work out well with ALR) so we can do some testing and the shell would be so coders could append this to any other EA.

There are 2 ways we could go:

1. The simpler way I think would be for the user to plug in the values for each turn. This has a couple advantages. This would allow for the user to use the ALR calculator to determine based on account size, risk, number of turns etc. to pick his or her own settings and then enter them in. It would require a good understanding of how to use it though.

2. The second way would be to plug the formulas directly into the EA, but we cannot use Klotsh’s formulas as is since it always starts with an initial value of .1. Depending on account size and risk, this number could fluctuate.

My recommendation is we go with option 1 for now. We might be able to improve the formulas with more tweaking. If we are just entering in the lot sizes we are fine. If we use the second method then we would have to ask the programmer to go back and redo all the code. You can imagine the not so warm and fuzzy responses that would generate.
Post Reply

Return to “Automated Loss Recovery”