Channel Trading: Viking1961 500 step system

Another question.

What is primerlockin? is it th trailingstop?

PrimerLockin = the first SL of the first primer when price opens the third primer.
Meaning:
Primer P1= 1.5300
Primer P2 = 1.5270
Primer P3 = 1.5240
when primer P3 is opened SL of P1 will become 1.5290 (this 10 pip is defined by Primerlockin variable). You can adjust it.

Anyways, guys - I have been working on adjusting the lot sizes as price retraces back to old open orders. attached is the latest version which will open extra orders if it finds open orders with lot sizes less than what it should be according to acountbalance.

I haven’t tested it much. So, please test and post comments/results.

Greenland strategy Rev 2-3.zip (4.39 KB)

WebZone: Please confirm or correct this. I think our primers are too small.
I’ve been thinking about the channel balance Michael refers to in many of his posts. If we think of the channel center as a fulcrum, then 2.000$ can cover a 600 pips movement in any one direction, at which time we will have 1.000 vs. 13.000 = 12.000 units difference and a drawdown of 0.06, or 1.2$ per pip.

Say we start at 1.5000. Then the “safe area” shoul be 1.5600 to 1.4400. Let’s then say we are at the safe bottom of 1.4400 and the rate starts to fall (without any retracements) to 1.4200, a 200 pip drop. Short primers should kick in at 1.4400 since it’s our channel bottom. Regular buys will have the following effect:
b1 1.4400 12000 1.2 -240 (200 pips fall for the existing old buys)
b2 1.4350 1000 0.1 -15 (150 pips fall fot his one)
b3 1.4300 1000 0.1 -0.1 (etc.)
b4 1.4250 1000 0.1 -0.5
b5 1.4200 1000 0.1 0
-255.6
Total drawdown for 200 pips from channel bottom will be 255.60$.

If we use (largest-smallest)/10000/step*step for primer lot size we will get 4.000 units for the primers. The result will be
p1 1.4400 4 000 0.4 40 (100 pips)
p2 1.4370 4 000 0.4 40 (100 pips)
p3 1.4340 4 000 0.4 40(100 pips)
p4 1.4310 4 000 0.4 40 (100 pips)
p1 1.4300 0
p5 1.4280 4 000 0.4 32 (80 pips)
p2 1.4270 0
p3 1.4240 0
p6 1.4240 4 000 0.4 16 (40 pips)
p4 1.4210 0
p7 1.4210 4 000 0.4 0.4
208.4

Total income 208.40$ will result in the equity falling 47.20$. In order to improve equity we must instead use 5.000$ to get:
p1 1.4400 5 000 0.5 50
p2 1.4370 5 000 0.5 50
p3 1.4340 5 000 0.5 50
p4 1.4310 5 000 0.5 50
p1 1.4300 0
p5 1.4280 5 000 0.5 40
p2 1.4270 0
p3 1.4240 0
p6 1.4240 5 000 0.5 20
p4 1.4210 0
p7 1.4210 5 000 0.5 0.5
260.5

Assuming we can open and close primers correctly (so only one primer will ever be left behind), the channel wil now have expanded to 1.5600 to 1.4200, and the new balance point will be 1.4900. A continuation down will move the border further and the last open short primer defines the current channel bottom.

Once the rate turns and we get above 1.5600, long primers will expand the channel upwards, and once again the last open long primer defines the channel’s top. As such, once rate movement has moved beyond +600 and -600 from initial center, we should always have 1 long and 1 short primer open.

Is this correct?

If so, I think the problem is that lot increases changes the balance and forces additional primers to be opened between top and bottom. That escalates growth of open units and drains the free margin.

Re
D

PS! The tables didn’t come out well, but they are mean.t to show
Name, Rate, Open units, $/pip, $/total for the movement

Hi Dennis,

Nice analysis, that is why I initially created the ChannelTop/ChannelBottom logic. We set initial borders and then let the channel expand according to primer values. Any retracement back should automatically increase the equity. If only we can find the perfect method to define primersizes and how to escalate normal lot sizes.
This strategy is all about money management.

Yes, I know. I didn’t get it at the time, but as I was looking through older versions of the EA and I decided to put the numbers in an Excel sheet to get a better look at it and then it reminded me of a fulcrum. I still don’t see how money management is done. Adding more money (to correctly placed and closed primers) should ensure balance, but how do we make sure we always have enough money to do that? Do we need some sort of “margin borders” as well where regular trades are suspended?

Re
D

Money management is done by primers.

  1. Primers are bigger than normal lots
  2. There are only 1 or two open ended primers.
  3. TP is higher.
  4. Primers are placed at 30 pips whereas normal trades are placed at 50 pips.
  5. When primers are placed then normal trades are suspended. You only placed opposite stop orders 100 pips above/below price.

These are all forms of money management.

True, but looking through the log files after my tests, 99% of the time you’ll find “Tester: pending order is deleted [no enough money]” just where things starts getting really sour :wink:

Re
D

Hmmmm…I haven’t tested this EA actively yet. Will do so tomorrow and try to see what is happening. Analysing the backtest is one heck of a job (to go through each and every trade). But have to do it.
What i like is that we are moving forward. We will reach a satisfactory stage soon. But, I still think manual intervention is sometimes necessary to make use of fundamentals etc. Relying on the robot alone might not be the most intelligent solution.

I think manual override of Lots and UsePrimer wil come in very handy for fundamentals. As for manual analysis, I did it once. Took me 9 hours. I strongly suggest you find out at what time whatever you are looking for is triggered and set stop date to there, or better yet, use false tick data. The included file rises straight up from 1.3 to 2.0 then falls down to 1.3 again, with no retracements. When the EA can handle that it can handle anything. Just import the data into any symbol you’re not using (delete existing data first). Test dates 2013.01.01 to 2013.01.02 (“a fun day for all” :wink:

Let me know if you need something else. I’ve set up an Excel sheet that can generate different scenarios.

Re
D

took a full test in visual mode, just to see the equity drop on the chart.
and its easy to see the equity gets worse when going back up from the big dip.

sguide0>> thanks for the false tickdata, that will come in handy!!


By the way, changing MathFloor with MathCeil might fix the lot calculations. According to WebZone “two shall be less, three shall be more” (Amen, I guess :wink:

And I still think that we must under any circumstances not allow two open primers to be left behind. I’ve found an example (with my own EA) where two open long primers caused short primers to open only 450 pips below. Then the rate turned, and long primers opened 100 pips below the already opened long ones. That’s a declaration of war on free margin.

Re
D

One more tool I use, change lot calculations to LotsNew = GreenlanderLots() and you will get the lot increases as described in the system dox.

Re
D

double GreenlanderLots()
{
double lotsNew = 0.00;

if(AccountBalance() < 2814.97)
{
lotsNew = 0.01;
}
if(AccountBalance() > 2814.97 && AccountBalance() < 4197.05)
{
lotsNew = 0.02;
}
if(AccountBalance() > 4197.05 && AccountBalance() < 6319.18)
{
lotsNew = 0.04;
}
if(AccountBalance() > 6319.18 && AccountBalance() < 8425.37)
{
lotsNew = 0.06;
}
if(AccountBalance() > 8425.37 && AccountBalance() < 10804.97)
{
lotsNew = 0.08;
}
if(AccountBalance() > 10804.97 && AccountBalance() < 16556.39)
{
lotsNew = 0.10;
}
if(AccountBalance() > 16556.39 && AccountBalance() < 31882.27)
{
lotsNew = 0.20;
}
if(AccountBalance() > 31882.27 && AccountBalance() < 66850.29)
{
lotsNew = 0.50;
}
if(AccountBalance() > 66850.29 && AccountBalance() < 86555.01)
{
lotsNew = 1.00;
}
if(AccountBalance() > 86555.01 && AccountBalance() < 160896.13)
{
lotsNew = 1.50;
}
if(AccountBalance() > 160896.13 && AccountBalance() < 269726.37)
{
lotsNew = 2.00;
}
if(AccountBalance() > 269726.37)
{
lotsNew = 5.00;
}

return(lotsNew);
}

CC, if you update the CheckPending… functions to

if(MathAbs(OrderOpenPrice()-NOP1< (spread+Slip*Point))
{
// Test for pending order with smaller than current standard lot size
if(OrderType() == OP_BUYSTOP || OrderType() == OP_BUYLIMIT)
{
if(OrderLots() <CurrentLotSize)
{
// Try to delete small order
if(OrderDelete(OrderTicket()))
{
Print(“Pending long order was deleted due to low lot size”);
OpenNewBuyTrade1 = true;
}
else
{
// Failed to deleted pending order, let the small one go instead
OpenNewBuyTrade1 = false;
}
}
else
{
OpenNewBuyTrade1 = false;
}
}
else
{
OpenNewBuyTrade1 = false;
}
}
}

small regular pending orders will be deleted and reset at current lot size. That might help a little.

Re
D

Thx for the new version. I haven’t managed any detailed testing. Just run the basic test on EUR/USD starting 1-1-2010 with 3000 USD. (usual 0.06 drop equity)

With the 2-2 version the channel survived 266 days and completed 382 trades

With the 2-3 version the channel only survived 214 days, completing 468 (I assume the extra trades on the shorter run is due to ‘double’ trades on the way up). But seems like the available equity drops around halfway-through and never really recovers from there…

So right now it looks as if this didn’t solve the problem at all; in fact increasing the problem that the above illustration of graph vs. profit-graph illustrates: The retracement (with primers and sell orders of increased size) is what kills the equity and thus the channel…

Dont have time today, but will run more tests and comparisons.

no, but as we talked about earlier, this was not the main problem, but had to be fixed anyway to help balance the channel… the primers is still the most important part for keeping the channel running (you could call it money management as CC said) :slight_smile:

I’ve updated the false tick data to only rise a single pip per 1M tick for accuracy testing. For 1.3000-2.0000 use 2013.01.01-2013.01.05. It falls back down to 1.3000 on 2013.01.10. I’ve also set OHLC to the same values which I hope will speed up testing as MT doesn’t have anything to use for it’s “fill in the blanks” algorithm.

To make your own trends just update the first sheet and use copy and drag. The second sheet (CSV) concatenates the result to the format MT4 expects. Save that sheet as a CSV file and you’ve got all fake history to import :wink:

Re
D

The primers might need some adjustment. In the case mentioned, it seems ok with 0,05 lots.
But I would like to make a small adjustment.
Keep in mind that You actually do have a fourth primer active for ten pips for every 30 pips. That makes it up for the little difference and keeping the primers in plus.

The example made is just to make the balance. It might be an idea to make all primer functions adjustable.

Personal I’m setting primers every 15 pips with a trailing stop of 2 pips and TP of 75 pips. It makes it more effective in trending markets and minimize the drawdown on retracements.

And then I would like to say it once again.
The system does not work on equitydrops.

The system is totally made from account Balance. and drawdown in percent pr. pip compared to account balance.

So please focus on account balance and pips drawdown compared to account balance

It is the primers that is going to balance the channel and it is the primers that is the money management.

We also need to check up on, if the trade sizes is matching the leverage on the accounts. It still doesn’t on my alpari x100 leverage. I’m still forced to use 0.8% is start capital is $2000 and 0,6% if start capital is $3000 This is pretty weird.

[B]Another important thing is:[/B]
This system is not a system, where You are supposed to shot down the trades at step 500. (That can only be done if you trade manual)
It is supposed to escalate to a certain level. i.e. lotsizes on the normal trades of 5.0 (adjustable) and then it shouldn’t raise any more. That would make You a steady decent income for as long as You wish it to continue.

well said, and spot on as always… now lets hope everybody reads it :wink:

Well read and noted. Lets continue with the experimentation.
I will take into account Dennis’ and Kent’s advices and see what I can modify on the EA to satisfy.

Yes totally agree with you there Webzone.
I was thinking the same thing: Would be good to code this to stop escalation once we reach a certain (adjustable) level. This should drastically improve the survivability of the channel long term. Once the equity has been built up to a level where it can sustain almost any market-movement we can start to lower the risk, and start taking out profits.

Ideally one should end up with a handful of channels on different currency pairs so that risk is divided, and then take out profits as we go :slight_smile:

Btw. my earlier post about 2.3 was not entirely correct. I reviewed my tests, and will post some graphs during the weekend. The new 2.3 version actually did improve the overall equity, so it appears to be a step in the right direction.