Request for Automation--Automatic Loss Recovery

Place your new trading idea here to see if someone can automate it.

Request for Automation--Automatic Loss Recovery

Postby Wapen » Thu Jul 03, 2014 5:16 am

Hi, This is a brilliant idea. I think it can be used as a stand alone EA. It will monitor all trades that are in the market.
I'm eagerly awaiting the first test version!! :yahoo: .

Regards
Wapen
User avatar
Wapen
 
Posts: 99
Joined: Tue Nov 29, 2011 7:24 pm
Location: Gauteng, South Africa

Request for Automation--Automatic Loss Recovery

Postby Dewey McG » Fri Jul 04, 2014 2:14 pm

Sorry to take so long to get back to you. I had some crazy hours this week and had to wait until I could get a good look and think clearly.

SpiderX » Thu Jul 03, 2014 12:47 am wrote: More refinement on concept:

Input:
ALRZonePips: Y
TargetPricePips: Z
InitialEntryPrice: A

(Assume Buy initial position)
Buy Entry Level : A
Buy TP/Sell SL : B = A+Z
Sell Entry Level : C = A-Y
Sell TP/Buy SL : D = C-Z


1. Enter initial position at level A with tp:B, SL: D
2. Calculate_Lot_Size
3. Enter a sellstop at level C. (tp: D, sl:B)

Loop: While number of trades < Max recovery trades, Check number of SellStop/BuyStop
If there are 0 SellStop/BuyStop, Previous sellstop/buystop has triggered:
4. Get lot size of last trade, and Calculate_Lot_Size
5. Create new buystop at A. (tp: B, sl:D) or Create new sellstop at C. (tp: D, sl:B)

All trades will automatically close once tp or sl is hit.

if number of trades = Max recovery trades, no more trades are taken.

This looks very good so far
SpiderX » Thu Jul 03, 2014 12:47 am wrote:
Calculate_Lot_Size function

Mulling on implementation of this.

Simple implementation:
extern string LotMultiplier = "1.2,1.4,1.6,1.7,1.9,2.1,2.3,2.5";
double LotMultiplierArray[20];

I don’t think the numbers on your string are correct. I have (0.10, 0.14, 0.09, 0.12, 0.17, 0.22, 0.29, 0.39, 0.52, 0.70, 0.93, 1.24, 1.66, 2.21, 2.95)
The formulas for calculating lot size are on the first tab (formulas) of the ALR Calculator 2.1 (or 2.0) if that will help.
SpiderX » Thu Jul 03, 2014 12:47 am wrote:
-Lot multiplier entered as a string and initialization function breaks it into a double array.
-Initialization function automatically set number of levels based on size of this input.
-During calculation of lot size, function looks for lot size of initial trade.
-Based on number of trades N, function will determine lot multiplier
-i.e : Next Lot Size = LotMultiplierArray[N] x InitialLotSize

Is this the ideal way to implement this ?
Someone got to enlighten me on this.

Cheers


I think that’s OK but now you are getting beyond my pay grade. However, you may always want to consider allowing the user to enter in the lot sizes. They can use the ALR calculator to determine their risk, account size maximum turns and it will give them what they need. After they enter them they can save their settings in a preset.

One advantage of that will be if we tweak the initial formula the EA does not have to be re-written altogether.

Hope this helps.
Dewey McG
 
Posts: 444
Joined: Sat Nov 26, 2011 4:20 pm
Location: Tampa FL

Request for Automation--Automatic Loss Recovery

Postby SpiderX » Sat Jul 05, 2014 4:57 pm

Ok...think the ALR part is almost done in my EA.
But what strategy is going to be used with it ?

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
User avatar
SpiderX
 
Posts: 576
Joined: Thu Aug 22, 2013 4:50 pm

Request for Automation--Automatic Loss Recovery

Postby Dewey McG » Sat Jul 05, 2014 5:07 pm

SpiderX » Sat Jul 05, 2014 12:57 pm wrote:Ok...think the ALR part is almost done in my EA.
But what strategy is going to be used with it ?

Cheers


Awesome!

1. I think there needs to be a stand alone trade manager so people can try it with their own strategies.

2. There are 2 types of strategies I think would work well with this--a break out strategy and a trend trading strategy. For the trend trading strategy you could use the one I mentioned in my first post for a simple one. Let me know if you have any questions. If you are feeling ambitious, you could trying NanningBob 1.7.

For a break out strategy, there are several. One of the best know is the stairstep breakout mentioned here: http://www.forexfactory.com/showthread.php?t=302007 I like to use volume based ones so you could also try The Kill Zone Asian Breakout

For now I would try whichever one seems easiest to code so we can start testing the viability of the concept. If it looks as promising as I suspect, I am sure there will be requests for many others. The main thing we want in picking a strategy for this is a high win rate. Some strategies that have high win rates but large stop losses might turn out to be winners with this since ALR would manage the losses.
Dewey McG
 
Posts: 444
Joined: Sat Nov 26, 2011 4:20 pm
Location: Tampa FL

Request for Automation--Automatic Loss Recovery

Postby Dewey McG » Sun Jul 06, 2014 4:05 pm

The more I think about this the more I think a breakout strategy would be ideally suited for using with ALR. When we trade breakouts, typically wither we are right and price heads straight for our TP or it turns out to be a false breakout and heads straight towards our SL. With ALR, either one is fine. We wither get our nice fat juicy TP or we get out for a small profit or break even.
Dewey McG
 
Posts: 444
Joined: Sat Nov 26, 2011 4:20 pm
Location: Tampa FL

Request for Automation--Automatic Loss Recovery

Postby Wavegarrick » Sun Jul 06, 2014 4:31 pm

Dewey I admire your thought Process keep on going Brother :clap:
User avatar
Wavegarrick
 
Posts: 1126
Joined: Sun Dec 30, 2012 11:21 am
Location: South Africa

Request for Automation--Automatic Loss Recovery

Postby Wapen » Tue Jul 08, 2014 10:12 am

Hi All, I was also thinking of using this with a breakout strategy. Especially a daily or weekly breakout strategy.

Eagerly awaiting the first ALR to test!
Regards
Wapen
User avatar
Wapen
 
Posts: 99
Joined: Tue Nov 29, 2011 7:24 pm
Location: Gauteng, South Africa

Request for Automation--Automatic Loss Recovery

Postby Dewey McG » Thu Jul 10, 2014 2:18 am

Wapen » Tue Jul 08, 2014 6:12 am wrote:Hi All, I was also thinking of using this with a breakout strategy. Especially a daily or weekly breakout strategy.

Eagerly awaiting the first ALR to test!
Regards
Wapen



Now you have 3 to test:

Trend trading EA with ALR from Spider (also set up as a shell to substitute other strategies: Trend Trading EA with Automated Loss Recovery

Trendtrading EA with ALR from madpipa:
Automatic Loss Recovery System (ALR)

Trade Manager from Wealthmaster (you can use this to test your own strategies with):
Automatic Loss Recovery System (ALR)
Dewey McG
 
Posts: 444
Joined: Sat Nov 26, 2011 4:20 pm
Location: Tampa FL

Previous

Return to Ideas for Possible Automation

Who is online

Users browsing this forum: No registered users and 0 guests

cron