Page 34 of 38

Automatic Loss Recovery System (ALR) - read this first

PostPosted: Fri Dec 05, 2014 10:38 am
by TambaTrader
Hi Blazecrown and Macman,

All the trades got placed successfully. When you hit the take profit in one direction the other trades are supposed to close and the pending buy or sell stop is supposed to get deleted. That is the bit that failed. If you don't close every trade in that basket but only close one direction of trades you are left with potentially large unprotected trades in one direction. I spotted it 20 minutes later and closed them manually but it could easily have blown my account.

Not worried about the small loss so much as the fact that I thought I had a good strategy. It is like two steps forward one step back all the time.

There is a work around - when it did it before on my demo account I started to put stop losses on the trades manually. I put them in the same place as the take profits of the opposite direction. I am starting to think this method is too risky for me if you have to trust an EA to work all the time. I might stick with EAs where they place the trades with TP and SL then if everything crashes you are still protected.

Another work around is that you manually close the trades once they get into profit. This would only work if you are monitoring your account a lot though. Or you could use another EA that closes all the trades once they reach x amount of profit.

I am sure this problem is fixable but I am not as keen on ALR as I was. I will have a break from it at least and try something new or go back to one of my old strategies.

I have got a few more SAS results on EURUSD though that I will post later.

Automatic Loss Recovery System (ALR) - read this first

PostPosted: Fri Dec 05, 2014 11:06 am
by TambaTrader
TambaTrader » Fri Dec 05, 2014 10:38 am wrote:
Or you could use another EA that closes all the trades once they reach x amount of profit.




Actually that's a stupid idea as if the original EA has stopped working because of some issue how is a second EA going to do any better?

Automatic Loss Recovery System (ALR) - read this first

PostPosted: Sat Dec 06, 2014 5:04 pm
by ronkeous
for your closing trades try using this... I never had any issues closing. try this

Code: [Select all]
 Please Login or Register to see this content
<


so your code should look like this
CloseAllTrades(true,902101321); note the 902101321 is just a value to pass.. if you know the ticket number it will close all trades except for that.

Automatic Loss Recovery System (ALR) - read this first

PostPosted: Sat Dec 06, 2014 5:06 pm
by ronkeous
macman » Fri Dec 05, 2014 4:27 am wrote:
TambaTrader wrote:I am about ready to give up on ALR. I thought the problem where it closes one side of the trades but not the other, was a problem with the fact my demo account was running on my laptop and not on my server.

It has just done it on my real account now though. That runs on my server. All the buys closed on Eurusd as it has just had a big movement up but the sells didn't. I was up to my 6th turn. I lost £90 which for my mini real account is a disaster. I'm only winning about a tenner a week when it goes well.

I like the Maths behind ALR but if you can't trust it will be executed properly the risk is too high.

Has anyone else had this problem?

I might not waste any more time on it and go back to using stop losses.

Yet another brick wall! That is so disappointing.


Do your logs give any indication as to why the operation failed?

As you already made 5 turns, it seems unlikely to be a software error.

Sorry to hear about the loss - 'things can only get better' as that well known song says :)

Best regards,



if your pending order fails because too close or maybe even gap try entering on Market. I use something like this...

Code: [Select all]
 Please Login or Register to see this content
<

Automatic Loss Recovery System (ALR) - read this first

PostPosted: Sat Dec 06, 2014 5:43 pm
by ronkeous
i wish I could upload an image here to show you my initial analysis but here it is in text

eur/usd from Jan1 2014 to dec 2014

Initial Trade 90 Pips target

Zone 30 pips
Zone Take Profit 90

ZoneCount_X[1] : 4 : 0.14
ZoneCount_X[2] : 10 : 0.09
ZoneCount_X[3] : 3 : 0.12
ZoneCount_X[4] : 5 : 0.16
ZoneCount_X[5] : 4 : 0.21
ZoneCount_X[6] : 4 : 0.28
ZoneCount_X[8] : 4 : 0.51
ZoneCount_X[10] : 2 : 0.91
ZoneCount_X[12] : 1 : 1.61
ZoneCount_X[14] : 1 : 2.87
ZoneCount_X[15] : 1 : 3.82

the numbers in [] are the Zone trade count.. ie [3] means it took 3 zone trades (initial trade, 1st sell, 2nd buy, 3rd sell leg in order to hit Zone Take Profit to close all trades)

: 0.14 is the lot size used

during this time strategy to just by if currently no open orders with initial TP of 90 Pips... it only hit TP 5 times... all the rest was the ALR trades to try to get out at break even.

broker used has leverage of 400:1 so after 15 Lets the margin used to open all trades was about $1800.

I typically don't have much time to post or reply so it may take me a while to respond.

btw in some other test i think it went up to 19 trades

Ron

Automatic Loss Recovery System (ALR) - read this first

PostPosted: Sat Dec 06, 2014 5:48 pm
by ronkeous
ronkeous » Sat Dec 06, 2014 12:43 pm wrote:i wish I could upload an image here to show you my initial analysis but here it is in text

eur/usd from Jan1 2014 to dec 2014

Initial Trade 90 Pips target

Zone 30 pips
Zone Take Profit 90

ZoneCount_X[1] : 4 : 0.14
ZoneCount_X[2] : 10 : 0.09
ZoneCount_X[3] : 3 : 0.12
ZoneCount_X[4] : 5 : 0.16
ZoneCount_X[5] : 4 : 0.21
ZoneCount_X[6] : 4 : 0.28
ZoneCount_X[8] : 4 : 0.51
ZoneCount_X[10] : 2 : 0.91
ZoneCount_X[12] : 1 : 1.61
ZoneCount_X[14] : 1 : 2.87
ZoneCount_X[15] : 1 : 3.82

the numbers in [] are the Zone trade count.. ie [3] means it took 3 zone trades (initial trade, 1st sell, 2nd buy, 3rd sell leg in order to hit Zone Take Profit to close all trades)

: 0.14 is the lot size used

during this time strategy to just by if currently no open orders with initial TP of 90 Pips... it only hit TP 5 times... all the rest was the ALR trades to try to get out at break even.

broker used has leverage of 400:1 so after 15 Lets the margin used to open all trades was about $1800.

I typically don't have much time to post or reply so it may take me a while to respond.

btw in some other test i think it went up to 19 trades

Ron


i figured it out :yahoo: feeling pretty dumb that I didn't figure this out earlier :arrrg:

Automatic Loss Recovery System (ALR) - read this first

PostPosted: Sat Dec 06, 2014 7:20 pm
by macman
ronkeous wrote:
ronkeous » Sat Dec 06, 2014 12:43 pm wrote:i wish I could upload an image here to show you my initial analysis but here it is in text

eur/usd from Jan1 2014 to dec 2014

Initial Trade 90 Pips target

Zone 30 pips
Zone Take Profit 90

ZoneCount_X[1] : 4 : 0.14
ZoneCount_X[2] : 10 : 0.09
ZoneCount_X[3] : 3 : 0.12
ZoneCount_X[4] : 5 : 0.16
ZoneCount_X[5] : 4 : 0.21
ZoneCount_X[6] : 4 : 0.28
ZoneCount_X[8] : 4 : 0.51
ZoneCount_X[10] : 2 : 0.91
ZoneCount_X[12] : 1 : 1.61
ZoneCount_X[14] : 1 : 2.87
ZoneCount_X[15] : 1 : 3.82

the numbers in [] are the Zone trade count.. ie [3] means it took 3 zone trades (initial trade, 1st sell, 2nd buy, 3rd sell leg in order to hit Zone Take Profit to close all trades)

: 0.14 is the lot size used

during this time strategy to just by if currently no open orders with initial TP of 90 Pips... it only hit TP 5 times... all the rest was the ALR trades to try to get out at break even.

broker used has leverage of 400:1 so after 15 Lets the margin used to open all trades was about $1800.

I typically don't have much time to post or reply so it may take me a while to respond.

btw in some other test i think it went up to 19 trades

Ron


i figured it out :yahoo: feeling pretty dumb that I didn't figure this out earlier :arrrg:


Thanks for the interesting posts.

ALR is an interesting concept for sure BUT to be of any real use the code of any EA needs to be 100% bullet proof, or at least able to warn users it is no longer functioning correctly. My own earlier post details how an ALR EA got stuck in a loop.

This opens up the can of worms that is the current state of Empty4/5 right now.

My own programming skills are not good enough to attempt this, so for now ALR is still a proof of concept for me.

Best regards,

Macman

Automatic Loss Recovery System (ALR) - read this first

PostPosted: Sat Dec 06, 2014 8:05 pm
by ronkeous
i can see you getting issues if you lost the zone count and you need to start from the start again. Trt having a label to display the current zone count.


i am not 100% sure but if you change timeframes your variable might reset... depends on your int OnInit() and OnDeinit() functions on your ea.

try playing around with golbal variables so your count or varables remain the same.


string MaxTradesAllowed = "MaxTradesAllowed"; // Global settings for all pairs
GlobalVariableSet("MaxTradesAllowed",7);

GlobalVariableGet(MaxTradesAllowed);

Set("MaxTradesAllowed",7);


say you need to reboot the computer or clost Empty4 then try external variables to re-initialize your Zone count or zone levels.

so default would be 0 to let the program set it, but if not 0 then use the override settings.

hope that helps your cause.

Ron

Automatic Loss Recovery System (ALR) - read this first

PostPosted: Sun Dec 07, 2014 8:04 am
by TambaTrader
ronkeous » Sat Dec 06, 2014 8:05 pm wrote:i am not 100% sure but if you change timeframes your variable might reset... depends on your int OnInit() and OnDeinit() functions


I have been changing timeframes on the chart that is running the EA so if that can cause problems that may have happened on mine.

I remember reading somewhere on this thread/forum about a version of ALR where you have stop losses so as to keep the lot size down. I am going to test that next I think. In my opinion the maths seems good for ALR but having so many trades open at such large lot sizes isn't good. In theory they are hedging and the net lot size isn't high. In reality something could go wrong.

There is more than one benefit to closing each trade before starting a new one.

1. Can keep lot sizes smaller as discussed already
2. No risk of one side of trades closing leaving you exposed
3. Results of each trade are independent from each other so if market is ranging and not hitting your take profit you can wait a few days/ weeks and finish off the ALR later when it's trending again. Or you can move to a completely different currency pair if you want.

Do you think point 3 is correct or is it just like a martingale then? Point 3 would mean you don't even need an EA you could just have your excel with the maths worked out and trade manually if you wanted.

Shona

Automatic Loss Recovery System (ALR) - read this first

PostPosted: Mon Dec 08, 2014 7:55 am
by Radar
Hey Shona
TambaTrader » Sun Dec 07, 2014 5:34 pm wrote:
I have been changing timeframes on the chart that is running the EA so if that can cause problems that may have happened on mine.

I remember reading somewhere on this thread/forum about a version of ALR where you have stop losses so as to keep the lot size down. I am going to test that next I think. In my opinion the maths seems good for ALR but having so many trades open at such large lot sizes isn't good. In theory they are hedging and the net lot size isn't high. In reality something could go wrong.

There is more than one benefit to closing each trade before starting a new one.

1. Can keep lot sizes smaller as discussed already
2. No risk of one side of trades closing leaving you exposed
3. Results of each trade are independent from each other so if market is ranging and not hitting your take profit you can wait a few days/ weeks and finish off the ALR later when it's trending again. Or you can move to a completely different currency pair if you want.

Do you think point 3 is correct or is it just like a martingale then? Point 3 would mean you don't even need an EA you could just have your excel with the maths worked out and trade manually if you wanted.

Shona


Check out SpiderX's ALR 2.0 Trade Manager

That system doesn't hedge, just closes out, and calculates the next lot-size, then enters in the opposite direction.

A few months ago, I had written a basket trader that incorporated ALR, using GlobalVariables to store all info needed in case of a restart/reboot, but I didn't like the death-runs, (and they always come eventually), so I threw it away :( Shame about that, 'cos a few days ago, I realized that if I just used ALR to recalculate the lot-size, then waited for a normal entry signal, I'd avoid the death-runs, (well, as long as my system had a good win/loss ratio in the first place).

As for whether ALR is a martingale, well, yeah, it is... It's just that we're increasing our risk by much smaller increments than with the standard martingale.

Have fun!

Radar =8^)