I'm eagerly awaiting the first test version!!
Regards
Wapen
This looks very good so farSpiderX » 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.
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)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 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.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
Awesome!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
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