Automatic Loss Recovery System (ALR) - read this first

Post your EA's using ALR here
Post Reply
User avatar
tex
Trader
Posts: 89
Joined: Wed Nov 16, 2011 7:27 am

Automatic Loss Recovery System (ALR)

Post by tex »

i second that, for forward testing it would be best to code a semi automatic version of the ea, where we are able to enter with our own strategies, then set the EA up with the starting ALR level and let it do its work when your trade is going to loose.
kotsh » Today, 12:46 wrote:for testing purpose, we can just use a random entry criteria, there is no need to find profitable trading strategies and spending time to coding them.

the purpose of this thread is to collect ideas on how to come up with an ALR EA which then each one of us can apply to his own trading strategy and recover trades that went against us..

i think we are drifting away from this initial goal.. just a thought..
wealthmaster
Trader
Posts: 38
Joined: Mon Jun 16, 2014 2:21 am

Automatic Loss Recovery System (ALR)

Post by wealthmaster »

alfonsomg » Wed Jul 02, 2014 9:57 am wrote:
madpipa » Tue Jul 01, 2014 7:30 am wrote:The lot sizes would be:
1 = 0.10
2 = 0.14
3 = 0.09
4 = 0.12
5 = 0.16
6 = 0.21
7 = 0.28
8 = 0.37
9 = 0.49
10 = 0.66

So your net exposure is 0.38 lots.
I don't know if this sounds stupid (please forgive me if it was said before) but what if after you have several turns, with several trades in each direction, the next time you have a turn instead of opening a new trade and piling up in that direction you just close the corresponding amount of lots in the opposite direction?

Let's keep it simple imagining there are no spreads. In that case once we hit the SL point for another turn we would be closing some lots from the direction we are leaving so that the total lot size is balanced in favor of the new turn direction. Once we run out of lots to close after several turns we add new lots on each turn.

The key would be to play with the spread costs, but with the logic properly done we would keep the total accumulated lot size at a sensible level. At least your will be less likely to run out of funds to open a new trade.

I don't know, just brain storming.




Looks like a very good idea.. Can anybody come up with spreadsheet for that?
kotsh
Trader
Posts: 31
Joined: Mon Sep 02, 2013 1:58 pm

Automatic Loss Recovery System (ALR)

Post by kotsh »

wealthmaster wrote:
alfonsomg » Wed Jul 02, 2014 9:57 am wrote:
madpipa » Tue Jul 01, 2014 7:30 am wrote:The lot sizes would be:
1 = 0.10
2 = 0.14
3 = 0.09
4 = 0.12
5 = 0.16
6 = 0.21
7 = 0.28
8 = 0.37
9 = 0.49
10 = 0.66

So your net exposure is 0.38 lots.
I don't know if this sounds stupid (please forgive me if it was said before) but what if after you have several turns, with several trades in each direction, the next time you have a turn instead of opening a new trade and piling up in that direction you just close the corresponding amount of lots in the opposite direction?

Let's keep it simple imagining there are no spreads. In that case once we hit the SL point for another turn we would be closing some lots from the direction we are leaving so that the total lot size is balanced in favor of the new turn direction. Once we run out of lots to close after several turns we add new lots on each turn.

The key would be to play with the spread costs, but with the logic properly done we would keep the total accumulated lot size at a sensible level. At least your will be less likely to run out of funds to open a new trade.

I don't know, just brain storming.




Looks like a very good idea.. Can anybody come up with spreadsheet for that?
The idea sounds good, BUT if you missed one point. When the trades are within the ALR zone both, the trades in the original trade direction and her hedge trades are in negative, so by doing any partial closes you are actually taking a loss which is against the whole idea of ALR.

For exmaple you have your original position open @ 0.1 lot and 1 hedge trade @1.4 lot, after hedge is triggered the trade goes again in the original direction through the ALR zone and back to first original trade entry level. Now you want to close part of the hedge position so the position in the original trade is bigger, which means you will close for example 0.7 lots of the hedge trade. Now if price doesn't hit TP and goes back into ALR zone you would have to open a second hedge trade + the size of the trade you partially closed in order to hit BE when the price reaches TP against the original direction.

So in the end, it will just make it much more complicated.

Again, in my opinion, if you use proper TP targets on the original and on the hedge trade, (i.e. at support and resistance levels) then I cannot imagine that your trade is not recovered with maximum 3-4 turns.
wealthmaster
Trader
Posts: 38
Joined: Mon Jun 16, 2014 2:21 am

Automatic Loss Recovery System (ALR)

Post by wealthmaster »

kotsh » Wed Jul 02, 2014 2:34 pm wrote:
wealthmaster wrote:
alfonsomg » Wed Jul 02, 2014 9:57 am wrote:
madpipa » Tue Jul 01, 2014 7:30 am wrote:The lot sizes would be:
1 = 0.10
2 = 0.14
3 = 0.09
4 = 0.12
5 = 0.16
6 = 0.21
7 = 0.28
8 = 0.37
9 = 0.49
10 = 0.66

So your net exposure is 0.38 lots.
I don't know if this sounds stupid (please forgive me if it was said before) but what if after you have several turns, with several trades in each direction, the next time you have a turn instead of opening a new trade and piling up in that direction you just close the corresponding amount of lots in the opposite direction?

Let's keep it simple imagining there are no spreads. In that case once we hit the SL point for another turn we would be closing some lots from the direction we are leaving so that the total lot size is balanced in favor of the new turn direction. Once we run out of lots to close after several turns we add new lots on each turn.

The key would be to play with the spread costs, but with the logic properly done we would keep the total accumulated lot size at a sensible level. At least your will be less likely to run out of funds to open a new trade.

I don't know, just brain storming.




Looks like a very good idea.. Can anybody come up with spreadsheet for that?
The idea sounds good, BUT if you missed one point. When the trades are within the ALR zone both, the trades in the original trade direction and her hedge trades are in negative, so by doing any partial closes you are actually taking a loss which is against the whole idea of ALR.

For exmaple you have your original position open @ 0.1 lot and 1 hedge trade @1.4 lot, after hedge is triggered the trade goes again in the original direction through the ALR zone and back to first original trade entry level. Now you want to close part of the hedge position so the position in the original trade is bigger, which means you will close for example 0.7 lots of the hedge trade. Now if price doesn't hit TP and goes back into ALR zone you would have to open a second hedge trade + the size of the trade you partially closed in order to hit BE when the price reaches TP against the original direction.

So in the end, it will just make it much more complicated.

Again, in my opinion, if you use proper TP targets on the original and on the hedge trade, (i.e. at support and resistance levels) then I cannot imagine that your trade is not recovered with maximum 3-4 turns.

You are right!! But I was thinking something differently.. I will try to explain it later..


Anyways, I hired a programmer 4 days ago to make an EA on ALR just like Dustin's EA .. If all goes well I might share here..
garyfritz

Automatic Loss Recovery System (ALR)

Post by garyfritz »

kotsh » Wed Jul 02, 2014 8:34 am wrote:The idea sounds good, BUT if you missed one point. When the trades are within the ALR zone both, the trades in the original trade direction and her hedge trades are in negative, so by doing any partial closes you are actually taking a loss which is against the whole idea of ALR.
D'oh!!

This comment made me realize -- I implemented my spreadsheet wrong. (You guys were supposed to check my work!! :D)

At each turn, I charged a loss against the ALR. Trade goes against you, take an SL loss. ALR reverses, take another SL loss, etc.

BUT as kotsh reminded me, you don't take the loss and close the trade. You keep each trade OPEN. So for example when your original trade goes against you and hits the ALR reversal, then that 1st turn ALR position goes against you and you open the 2nd turn, you don't have 2 SL's of loss (original trade and 1st turn). The 1st turn position is at the SL, BUT the original trade is back at breakeven! AND when you eventually hit the TP, you still have all those positions open.

So now I'm not sure I understand this beast at all. Please check my logic on this. Assuming 60 pip TP and 20 pip ALR reversal zone:

0. Original trade goes long at 100.00. Shooting for a TP at 100.60, ALR reversal at 99.80.
1. Market reverses, you enter #1 ALR position, a short at 99.80. Open equity is -20 pips.
2. Market reverses, you enter #2 ALR position, long at #0 entry. #0 and #2 are at BE, #1 is at -20 pips.
3. Market reverses, enter #3, short at 99.80. #0 and #2 are at -20, #1 and #3 are at BE.
4. Market continues down, hits #3's TP at 99.80 - 60 pips = 99.20. #1 and #3 are at +60, #0 and #2 are at -80. Position sizing determines your profit. If #1+#3 sizes are 80/60*(#0+#2 sizes) or greater, you make a profit.

Do I have that right now? If so, I'll come up with a corrected spreadsheet.
kotsh
Trader
Posts: 31
Joined: Mon Sep 02, 2013 1:58 pm

Automatic Loss Recovery System (ALR)

Post by kotsh »

garyfritz wrote:
kotsh » Wed Jul 02, 2014 8:34 am wrote:The idea sounds good, BUT if you missed one point. When the trades are within the ALR zone both, the trades in the original trade direction and her hedge trades are in negative, so by doing any partial closes you are actually taking a loss which is against the whole idea of ALR.
D'oh!!

This comment made me realize -- I implemented my spreadsheet wrong. (You guys were supposed to check my work!! :D)

At each turn, I charged a loss against the ALR. Trade goes against you, take an SL loss. ALR reverses, take another SL loss, etc.

BUT as kotsh reminded me, you don't take the loss and close the trade. You keep each trade OPEN. So for example when your original trade goes against you and hits the ALR reversal, then that 1st turn ALR position goes against you and you open the 2nd turn, you don't have 2 SL's of loss (original trade and 1st turn). The 1st turn position is at the SL, BUT the original trade is back at breakeven! AND when you eventually hit the TP, you still have all those positions open.

So now I'm not sure I understand this beast at all. Please check my logic on this. Assuming 60 pip TP and 20 pip ALR reversal zone:

0. Original trade goes long at 100.00. Shooting for a TP at 100.60, ALR reversal at 99.80.
1. Market reverses, you enter #1 ALR position, a short at 99.80. Open equity is -20 pips.
2. Market reverses, you enter #2 ALR position, long at #0 entry. #0 and #2 are at BE, #1 is at -20 pips.
3. Market reverses, enter #3, short at 99.80. #0 and #2 are at -20, #1 and #3 are at BE.
4. Market continues down, hits #3's TP at 99.80 - 60 pips = 99.20. #1 and #3 are at +60, #0 and #2 are at -80. Position sizing determines your profit. If #1+#3 sizes are 80/60*(#0+#2 sizes) or greater, you make a profit.

Do I have that right now? If so, I'll come up with a corrected spreadsheet.
Hey Gary,
what you had understood in the beginning is not "wrong", it is just the non-hedging mode of ALR :) like if you are from US and hedging is not allowed with your broker.

In DP videos it is all explained, did you see it? (search google)

You can just use my sheet if you want to calculate the position sizes for hedging mode, rather than making a new one. Only play with the EA inputs field highlighted.
ALR_kotsh_v2.3.xlsx
Cheers
You do not have the required permissions to view the files attached to this post.
madpipa
Trader
Posts: 62
Joined: Fri Oct 19, 2012 12:59 am
Location: Gold Coast, Australia

Automatic Loss Recovery System (ALR)

Post by madpipa »

Hi Gary,

Here is my simple spreadsheet. It doesn't take spread into account as in kosch's sheet. And it rounds up or down on the lot size to 2 decimal places to agree with broker's lots. When the lot sizes are rounded UP it should make enough profit to account for most of the spread costs in most cases. As far as I can tell it is correct, but the trades differ slightly to those in DP's pdf.

Cheers,
Mick
You do not have the required permissions to view the files attached to this post.
abbey
Posts: 8
Joined: Thu Jul 03, 2014 4:59 pm

Automatic Loss Recovery System (ALR)

Post by abbey »

Hi, new to this site. I have traded fx for years and currently trade emin Gold futures. My trader friend bought ALR against my advise. I think it is just a matter of math. There are some very thoughful post on this site. Too me ALR just delays the same outcome. Is it not all the same in the end? Would not the spread create a loss after the many turns? Thanks
User avatar
Eamonn
Trader
Posts: 87
Joined: Wed Nov 16, 2011 6:45 am

Automatic Loss Recovery System (ALR)

Post by Eamonn »

abbey » Thu Jul 03, 2014 6:12 pm wrote:Hi, new to this site. I have traded fx for years and currently trade emin Gold futures. My trader friend bought ALR against my advise. I think it is just a matter of math. There are some very thoughful post on this site. Too me ALR just delays the same outcome. Is it not all the same in the end? Would not the spread create a loss after the many turns? Thanks
Hi

Welcome to Steve's forum, I was wondering when you guys would turn up, first post been trading for years
somebody bought ALR against my advise, blah blah blah.

Let's get a working EA before this thread dies.


Eamonn.
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 »

One error that a few people are making is what happens after the last turn. We do NOT close all trades at the last turn. at this point we wait. One of 2 things will happen. If the original trade was a buy then either it will go up 150 pips (or whatever the TP amount is) and we make a small profit or we go down 200 pips from the original price, which is the TP for the sell trades (150 pips plus 50 pips ALR zone).

This also means the odds are actually better after the last turn. We need 150 pips for a small profit but it will take 200 pips for us to hit a loss. So the last trade has a 57.14% chance of success not 25%. This only applies to the last turn.

Updated ALR Calculator is attached and will also be updated on post 1
You do not have the required permissions to view the files attached to this post.
Post Reply

Return to “Automated Loss Recovery”