It’s just commented out. Remove the “//” in front of the function call in Start().
Re
D
It’s just commented out. Remove the “//” in front of the function call in Start().
Re
D
Ah ok. didn’t see that…
I really have to get my self together and learn MQL4 soon.
I feel I have a handicap here ROFL
hmm… even if i set the lot size static to 0.01 i end up with some trades of 0.11
how is the pimer % lot size calculated? from the standard lot size, or from the balance?
EDIT: if i run with both a fixed lot size of 0.01 and primer size of 0.04 it seems to work pretty good, so the primer placement itself is looking promissing
EDIT 2:
here is an test with the static sizes from my first edit, as you can see the equity is getting better each time the primers are implementet, so i think that the only reason for the crash now, is that the primers is not implementet in time (the 0.06 in drawdown)
https://dl.dropbox.com/u/93453374/rev1-2-2/Strategy%20Tester_%20Greenland%20Strategy%20Rev%201-2.pdf
Guys,
I was seeing the results. The primer set up is not working as it should. There should be a max of 2 open primers without SL at one point of time. This is not happening.
Reason: Lets say last two sell primers on GBPUSD are open at 1.5000 & 1.4970. Price starts retracing upwards towards 1.5200. At this point the EA is still placing primers below 1.5200, but it should not. It should only place if price goes below 1.4940.
I will rectify this error soon. The results should improve dramatically after that.
oohh, didnt notice that, you have better eyes than me
I was wrong. The primers are being placed perfectly.
The problem was with the Dist code.
For eg.
Lets take GBPUSD again:
Primer P1 at 1.5300
p2 at 1.5270
P3 at 1.5240
P4 at 1.5210
At price 1.5200 there will be a normal buystop placed at 1.5300, P1 will hit TP
P5 at 1.5170 & P2 will hit TP
At 1.5150 there will be a normal BUystop placed at 1.5250
P6 at 1.5140 & P3 will hit TP
Lets say price starts retracing from here. Primer P4 hit TSL of 10 pips green. Buystop at 1.5250 is converted to buy and lets say price goes up a bit more. Now because of the “Dist” parameter it will place a sellstop at 1.5250 when prie reaches 1.5260. But according to our logic when price is below Channelbottom only buy orders will be placed and sell primers will be placed. No normal sells to be placed. This was not coded in properly. I have rectified the code now. Attached herewith. You should find results improving dramatically. It is time to sleep for me. Please test some pairs and post results.
I believe this time results should be good :53:
Greenland Strategy Rev 1-3.zip (2.92 KB)
Hi,
What happens if you start/stop the EA? Does this go smoothly (e.g. without any impact on existing orders)?
I think there’s a problem with leverage. Regardless of what I set the Percent variable to (100 or 0.000001), I get lot errors if account is set below 20.000 (which gives me 0.01 lots). I’m testing in an XEMarkets x100 account.
What leverage and account size are you guys testing this with?
Re
D
I think that we need to focus about getting this to work with the 0,06% in stead of fixed borders.
It clearly does not follow the pattern of Greenland with fixed borders. It work far to slow.
So there is no reason to use all this time, trying to get it to work with fixed borders.
The system needs escalating primers to work. And it needs them to be started at 0,06% drawdown.
So that should be our priority number one.
Actually I took a stab at this myself and I think I got the calculations right for primers. I haven’t written the trade logic itself yet (as CC was doing that already), but the print-outs look correct (look in the journal and you’ll be warned when primers should be placed and it what direction).
I do have issues with leverage. I used a different calculation than CC for calculating lots. Mine works in x100, haven’t checked other leverages yet. I’ve set a new variable extern double Risk = 0.005; (ie. 5% of balance risked, or 10$ for 2.000$ account). Then I calculate lots using
LotsNew = (MathFloor(((((Free*Risk)*Leverage))/100000)/Step)*Step);
There may be issues about this calculation that I don’t know yet (leverage, crosses, etc.) but in my x100 account the lots grow correctly.
Basically this is CC’s code, I just added two functions to calculate drawdown and finding current trend direction. Also primer placement code is currently just a copy of regular placing code, but maybe this will give CC some ideas and save him some time.
Re
D
Here’s a Visio diagram of the functionality as I see it (old on page 1, my twist on page 2, the clear boxes aren’t implemented yet).
The problem I faced is that since both Check(X)LevelPending functions places both long and short, I can’t use them for regular trades going against the primers, I would need to split out both checks and orders into their own utility functions. If I do that and CC doesn’t, the project will split and effort double.
CC: What do you think? Is my primer logic a way to go?
Re
D
PS! My code is based on CC’s version 1.1
I just took a test with the exact same settings as last time, and the equity looks alot better, im like webzone also voting for trying to get the auto primer to work on drawndown instead of borders, because with the borders we would have to change the borders all the time, and manually calculate where the borders should be… so better to have that on auto
https://dl.dropbox.com/u/5267610/greenland/rev1-3/rev1-3.pdf
okay guys,
now i tried with auto lot & primer sizes… i have a crash after 3,5 month, but look at that insane increase in balance and equity before the crash by the auto increasing primers…
203 steps in 3½ month… well thats a new one, and clearly the magic of primers, but still something wrong, as i see 12 big sized trades closed at stop out, and to carry 12 primers back up wount work
This increase looks pretty incredible. Can you identify what happens in terms of the crash? Why does it happen, and can we avoid it?
yes, my guess is, that the problem CC tried to correct, doesnt seem to be fixed yet, as there is 12 primers open when channel is stopped out, that will give an insane drawdown when the rate has turned and is going back up… and because the drawdown is not automaticaly calculated, there is nothing to counter the big drawdown
I tried to implement CC’s new primer placing code with my drawdown calculation. Clearly I didn’t get it right as the channel eventually blew up, but I think we’re heading in the right direction. From 2.000$ to 31.670$ in 9 months running from Jan 2008. The first primer kicks in at order 501 with 0.34 lots. Primers just grow from there, so I’m pretty sure I have something backwards, but I’m too tired to find it now.
Re
D
LOL, tried your version, and look at the size of the primers… they are insane
https://dl.dropbox.com/u/5267610/greenland/rev1-3-DG/rev1-3.pdf
Yes, but hopefully it is just some minor bug that an actual programmer can correct
Re
D
Guys,
I agree that the drawdown method is the best way. I am working on the equity drop version and hope to release it this week. Dennis-> Thanks for your logic. I will have a look at them and implement it. Wherever i face a problem in the logic I will contact you guys.
I need some clarification about primer calculations in practice.
The rules say (as I understand them) that once drawdown is 0.06%, you add a primer of 25% of the total units on the largest side to the smallest side in order to create better balance (discretionary trading for quicker profits are not relevant here).
So if I have 1.000 longs and 13.000 shorts, I would add 4.000 longs in the first primer. Is this correct?
If so, the problem is that mathematically I will on the very next tick have a balance of 5.000 vs 13.000 units and a drawdown of 0.04%. Hence the primer functionality turns off and the one and only primer will run to TP or SL. Only then would we see if another primer is needed.
Is that OK, or should I push the primers until they start hitting SL regardless of balance? I can see potential profits in adding more primers, but also more risk as you could get stuck with open primers going against the trend on multiple rate levels.
Speed isn’t an issue with an EA, so maybe only one primer should be used at a time? (Ie. “the primer” is placed and trailing stop loss is modified. When it closes, another calculation is done to see if “the primer” is needed again).
Re
D