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 »

I agree you absolutely have to be careful, but I think you can do that and have a real winner here.

Let's say you have a 50% win rate. At 10 turns your odds of hitting a SL are .0977%, or about 1 in a thousand.

Say you are feeling confidant and go with a 5% risk on a 20,000 account. That means you are using .07 lots per initial trade and your SL would be $1,000 of you hit it.

.07 lot size * 150 pips = $111.11 for a winning trade.

Now let's say over the next year and a half you take a thousand trades. I did 352 in 5 months this year, so at that pace it would take me 14 1/2 months. Depending on what strategies used some will do far less and some will do more.

111.11 * 500 = $55,555.56

Now let's say you didn't go to church each Sunday and God punishes you by making you hit SL 3 times instead of just once (BTW-that was a joke):

-$1000 * 3 = -$3000

The other trades should close out at a small profit but we need to account for slippage, spread, commissions etc. so we'll say we just break even on those give or take.

net profit = $55,555.56 - $3,000 = $52,555.56

Can we agree this is worth creating an EA trade manager and exploring further?

Feel free to check my math since I do make mistakes, but I really think we could be on to something.
User avatar
SpiderX
Trader
Posts: 554
Joined: Thu Aug 22, 2013 4:50 pm

Automatic Loss Recovery System (ALR)

Post by SpiderX »

We still have to consider that if we are using ALR...the money is "locked" for a period of time.
This blocks you from taking new trades and there are greater possibilities that you would miss trades which you would not typically miss in a normal sl situation, especially when you hit a market which ranges within your zone.

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

Automatic Loss Recovery System (ALR)

Post by Dewey McG »

SpiderX » Sun Jun 22, 2014 8:38 pm wrote:We still have to consider that if we are using ALR...the money is "locked" for a period of time.
This blocks you from taking new trades and there are greater possibilities that you would miss trades which you would not typically miss in a normal sl situation, especially when you hit a market which ranges within your zone.

Cheers
True--plus if you have a few trades open which go through a few turns, you need to keep a close eye on margin
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 guys,

Looks like I missed the start of the party! :party:

I had tossed around this general concept in my head a few months ago, but I couldn't get the idea to solidify in a way I thought was viable. I have been teaching myself to write EAs & indicators so I can test some of my ideas. When I went to my "Trading ideas" document last month I read this idea again. I have since written a couple of EAs loosely using this reverse trade approach but mainly based around grid-style trading.

I had just started playing with pen on paper, drawing doodles of alternating buy/sell trade patterns & shared the concept with some trading mates. Then I got an email for Dustin's latest & greatest. That almost made me throw the whole concept out the window. But in a moment of clarity I realised the maths was fairly simple. I dropped it into a spreadsheet & looked in slight disbelief at how well it seemed to handle a losing position. :)

So I made a simple EA to test the limitations. I'm not sure if it falls under the definition of Martingale or not. I have seen quite a few "definitions", and they varied considerably! But I will concede it certainly has some martingale characteristics - such as increasing lot sizes. The worst characteristic is it will blow your account if left unattended!!

I will add an EA to the next post. Please excuse the coding of this EA. :oops: It was never meant to be released, has suffered a few deletes/re-writes (so messy - even by my standards) & is just the last variation on some developing ideas I have looked at. But it serves one advantage - it allows you to run a backtest to get an idea of what the limitations are. I agree with Steve that backtests are not useful to tune an EA, but I don't mind exploring "what-if" concepts this way.

Cheers,
Mick
madpipa
Trader
Posts: 62
Joined: Fri Oct 19, 2012 12:59 am
Location: Gold Coast, Australia

Automatic Loss Recovery System (ALR)

Post by madpipa »

Do NOT use this EA for live trading!!!

It is not designed to be traded - it is only meant to test a concept.

Now, don't get the wrong idea of this EA. It is not designed to be traded & make a profit. I wanted to test the concept & see what problems the EA would get into. To this end it has little trading logic. The only thing it checks is to see what the last candle was. If it was a bull candle, it buys. Bear candle = sell. It is always in the market, not looking for good trades! I wanted it to create as many problems as quickly as possible! So it opens another trade immediately one is closed.

And it does get itself into trouble, as garyfritz suggested near the start of this thread. The bigger question is: Can we find a way around the problem/s?

As Dewey said earlier, you need to keep the Win:Loss around 3:1 or higher. I have done some optimising (sorry Steve :roll: ) and it seems to work down to about 2.5:1. But the safer? ratio seems to be 3:1 & above.

Main Inputs:
LotSize = 0.03 - better to start low
MinProfit = 2 - this would be trade $ profit (including any commission & swap)
StopLoss = in pips
TakeProfit = in pips - if set to 0 (zero) then the TPFactor must be > 0, preferably > 2.5
TPFactor = 0 - this is ONLY used if there is no TakeProfit

The reason for the TakeProfit is so I could set TakeProfit = 0 & then do some dirty optimising to see what multiples of StopLoss worked best. More importantly, it gives an indication of what doesn't work. I'm not trying to find the "perfect settings" for each currency pair, but rather trying to get a gut-feel for the ballpark factor that would work fairly well on most pairs.

MinProfit allows a $ profit to be used for each set of trades. This means that a set of trades can be closed for 0$ or even $10 or $20. If you set MinProfit = -1000 it will basically ignore the profit level & just close the trades based on the TakeProfit pips. Again, good for testing. If you are looking for a positive outcome of each trade it is probably best if this value is kept small for now (say 2 - 10).

One thing to note: I have set the incremental lot size to always be the next size up using micro lots. What I mean by this is if the first lot size = 0.1, StopLoss = 20 & TakeProfit = 60 then the next lot size would be 0.133333 lots. So I make this always round UP to the next micro lot, so it would be traded at 0.14 lots.

If you have any questions about the EA then please feel free to ask. I currently have some time to do some more testing, so if you want some changes just say so & I will consider them. But I won't incorporate any trade concepts into the EA until after it has been well evaluated in terms of not killing accounts. If anyone wants to take some ideas & write a better EA please feel free - I won't mind.

Mick
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 »

Some more thoughts.

It is fairly obvious that this concept requires price to move in either direction a certain number of pips to get out of a set of trades. It would also be obvious to those who have been around for a while that the market is moving far less these last few months than it was last year, or 2 or 3 or more years ago. Here is EURUSD as an example:
EU Volatility.png
Daily Volatility has changed from a high of 180 pips in October 2012 to 58 pips now.

So if we use a larger TakeProfit then we can assume that the trade:
* may not ever reach either TP, or
* may have trouble reaching either TP, or
* may take longer reaching TP, thus tying-up trading capital

To this end I did some stupid optimisations. To my surprise I found that some ridiculously small SLs actually worked on my non-trading EA - like 2 pips!!! But using a more sensible SL = 10 worked fairly well for some pairs. The video showed an example from Dustin using 50 pip SL with TP = 150 pips. In this market it is probably more likely that smaller values such as SL = 20 & TP = 60 may work better (or even SL = 15 & TP = 45).

Ideally, I think what we are looking for is something like a breakout style of trade. In these cases we expect price to move a number of pips fairly quickly. If we applied the ALR concept & price did a false break & then reversed (seen that before!) then we should at least get out around breakeven in fairly quick time. We really don't want a trading system that is ideal for ranging markets.

If we look at the volatility angle - maybe the "best" settings for SL & TP would be relative to a pairs volatility? I haven't tested this yet but it sort-of follows. Maybe grouping pairs into 3 or 4 groups & applying a set SL & TP for each group may work?
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 »

Sorry for the multiple posts but I need to get some of these ideas on "paper". And I would appreciate being told if or where I am wrong!

Another thought I had is if a trade makes a number of legs - lets say 6 - then we could fully hedged the set of trades & wait till later. This means we could:
* re-evaluate the trades & make a more informed decision how to proceed
* wait for more volatility in the market to get out of trouble (it maybe in the Asian session)
* pre-set a pip range. This will stop the EA from trading again until it goes outside this range.
* use another trade to nullify the losses held on this currency pair (like basket trade?)

There are certainly other possibilities.

Another way of looking at the concept is to allow the EA to take a small loss for each group of trades. Maybe not ideal? But it would allow the lot size to be always rounded down instead of up as it is currently. That will allow more trades to get out of trouble as the lot size would grow less quickly.
And to be honest: if I place a trade risking $50 and get the direction wrong and only end up only losing $5-10 then I am happy. :clap:
User avatar
SpiderX
Trader
Posts: 554
Joined: Thu Aug 22, 2013 4:50 pm

Automatic Loss Recovery System (ALR)

Post by SpiderX »

hi

Some ideas from my end:
maybe we could consider stacking trades every n pips movement in the right direction, then with every stack, the zone is shifted upwards (for stack buy) or downwards (for stacked sell)...in that manner...the zone is dynamic and could shift up and down with each wave of price movement.
Downside is that your positions grow faster than the original approach and maybe we have to be limited to less legs.

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

Automatic Loss Recovery System (ALR)

Post by Dewey McG »

madpipa » Mon Jun 23, 2014 3:03 am wrote:Some more thoughts.

Ideally, I think what we are looking for is something like a breakout style of trade. In these cases we expect price to move a number of pips fairly quickly. If we applied the ALR concept & price did a false break & then reversed (seen that before!) then we should at least get out around breakeven in fairly quick time. We really don't want a trading system that is ideal for ranging markets.

If we look at the volatility angle - maybe the "best" settings for SL & TP would be relative to a pairs volatility? I haven't tested this yet but it sort-of follows. Maybe grouping pairs into 3 or 4 groups & applying a set SL & TP for each group may work?
I will have to go back and have a look, but I seem to remember on his video that Joseph mentioned tying the levels for each pair to their ATR's.

You can check each pairs volatility here: http://www.myfxbook.com/forex-market/volatility.

I like your idea of using this with a breakout strategy. I think using more volatile pairs on a breakout with increasing volume plus ALR would be a great way to trade this.

Thanks also for the EA. I will have a look later on
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 updated post 1.

Make sure when you want to test different TP and PT levels on the risk tabs that you also change them on the tab that says 50-150
Post Reply

Return to “Automated Loss Recovery”