Channel Trading: Viking1961 500 step system

yes, i followed your conversation on openbook, and so far it looks alot like what M said :slight_smile:
and i know that he would also like us to have sucess with this project, so im sure he dont mind answering questionsā€¦ futhermore he said many time that he loves talking about the system and helping others, and would much rather do this, than talk about all the etoro specific problemsā€¦

but ofcourse i will relay your questions if you wantā€¦ im here to do what i can to help :slight_smile:

This Excel sheet should map out correct primer placement and sizing. Will send the link to M and ask for feedback.

Green SL is the trigger, red SL is where SL should be set. 3x means 3 times currentLotSize. Secondary primers are 50% of that, and sub-primers are initially 25%, but can be increased if violent movements. The other sizes should not be changed manually.

Main primers are spaced based on retracement patterns, but I put in 80 as a default since you canā€™t allow a 200 pip fall to happen with only one primer even if there isnā€™t any retracement as that would take out equity.

http://sdrv.ms/18rdMBy

Re
D

Attached Rev 0-3. This should most definitely avoid the problems in 0-1 & 0-2.
IMP NOTE: If you want to close any orders manually, please switch off first the Expert advisor by clicking the button on your MT4 terminal. Then do manual changes like deleting pending orders etc. Once all changes are done, switch on the Expert Advisor again.
Any doubts pls ask me.

Zepp,
Pls test and let me know if now the orders are placed proper now.

Thanks
CC
Greenland strategy with fixed lot size No primers Rev 0-3.zip (2.85 KB)
Greenland strategy with fixed lot sizes and primers REV0-3.zip (4.13 KB)

removed all orders, added new EA, started EA, aaaand it made a double order, see the marked trade, and the 2 0.01 sell tradesā€¦

https://dl.dropboxusercontent.com/u/93453374/screen2.jpg

Very strange Zepp, the default settings are all for 4 digits. I hope you had modified it to 5 digits before adding EA (Iā€™m sure your answer will be yes, but still checking).

yes, ofcourse :wink:

if it executes i will just turn off the EA, and close the 2 0.01 trades in green, and turn the EA back on, so not a big problem, but would ofcourse be better if the problem wasnt there in the first place :smiley:

HI Zepp,

Try as below:

  1. Remove present EA Rev0-3 from chart
  2. delete the 0.02sellstop at 1.50351
  3. Attach new EA Rev 0-4 to chart
  4. try again
  5. Give good news :slight_smile:

Greenland strategy with fixed lot size No primers Rev 0-4.zip (2.86 KB)
Greenland strategy with fixed lot sizes and primers REV0-4.zip (4.13 KB)

This secondary primers and sub-primers can be coded. Shouldnā€™t be a big issue.
I will work over this weekend and try to code that.
By that time if you work out some more maths let us know.

yeaaaahhā€¦ it didnt open the extra order this time :smiley:

Glad to hear that.

I was checking the code and I think there is a bit of error with the primer opening functions. I am working on it. will release the next version soon.

Cheers
CC

Really? Thatā€™s great! I havenā€™t got the foggiest idea of how to make parallel primers work. I barely managed to get one working, and even that is a hobbled together mass of manual mess using lots and lots of if statements. It has helped me think through the many aspects of the system (and thereā€™s a lot to it when you get down to the nitty-gritty), but thereā€™s a reason why I havenā€™t published my code :wink:

Re
D

I just got confirmation from M that secondary and sub primers should be reopened if taken out by SL and rate returns for a second, or more tries.

I need to mull the rest over to make sure I got it right, but hereā€™s the thread for those of you not spending all of your time on Michaels wall.

sgude0: @viking1961 Just two more question please. Should secondary or sub-primers taken out by SL be replaced if a main primer is still open in that range?
And, do you always extend you grid of regular orders when a primer closes, or are there extra rules for this?

viking1961: Yes, they should be replaced , as long as the primer is still intact. If the main primer then is hit by SL you replace it with a secondary primer, to balance out if it drop again . You can always use sub-primers of regular trade size, with shorter tpĀ“s . But donĀ“t trade against the drop unless you have changed the equity and are in balance . You can however use average sized positions , in the opposite direction, but like every 100 pips, just to be prepared for when the rate turns back again.

Re
D

Thanks D.
Will try my best to code as much as possible.

CC

if we choose to do this, it would be better to make it pips that add up with the TP variable, for instans 100 pips works great if we have a 50 pip TP, but for my 30 pip TP channel 90 pip or 120 pip maybe a better choice (maybe a TP multiplier variable set by the user?)

Iā€™m not completely sold on that sentence yet as M is kind of negating himself in the line before, but the way to do this would rather be to skip every n order for m distance from channelTop/Bottom. Sort of like ā€œif equity < 40% skip every 2 order of type xā€. Messing with the TP will impact the other trades and should therefore be avoided.

Re
D

[QUOTE=ā€œsgude0;495414ā€]

Iā€™m not completely sold on that sentence yet as M is kind of negating himself in the line before, but the way to do this would rather be to skip every n order for m distance from channelTop/Bottom. Sort of like ā€œif equity < 40% skip every 2 order of type xā€. Messing with the TP will impact the other trades and should therefore be avoided.

Re
D[/QUOTE]

Im not sugesting messing with The TP If you read my post again, i was sugesting a new variable where The user could set like 2 If they wantet 2xTP so 100 pip distance If TP is set to 50 and 3 for 3xTP so 150 pips with 50 pip in TP

Sorry, missed that.

Re
D

Hi, assuming you save currentLotSize as a global variable, the primer sizing code would be:

double MainPrimerSize = 3.0;
double SecondaryPrimerSize = 1.5;
extern double SubPrimerSize = 0.75;
int regsMagicNumber = 12345;
int mainPrimerMagicNumber = 11111;
int secondaryPrimerMagicNumber = 22222;
int subPrimerMagicNumber = 33333;

double CalculatePrimerLotSize(int type) //1: Main, 2: Secondary, 3: Sub-primer
{
double primerSize = 0.000;
switch(type)
{
case 1: //Main primer
{
primerSize = (MathCeil((currentLotSize*MainPrimerSize)/step)step);
break;
}
case 2: //Secondary primer
{
primerSize = (MathCeil((currentLotSize
SecondaryPrimerSize)/step)step);
break;
}
case 3: //Sub-primer
{
primerSize = (MathCeil((currentLotSize
SubPrimerSize)/step)*step);
break;
}
}
return(primerSize);
}

void OpenMainLongPrimers()
{
double primerLotSize = CalculatePrimerLotSize(1);

int buyOrderTicket = OrderSend(pair,OP_BUY,primerLotSize,Ask,slip,0,0,ā€œPRIMERā€,mainPrimerMagicNumber,0,White);
}

Use CalculatePrimerLotSize(1) for main primers, (2) for secondary and (3) for sub-primers. Note that only SubPrimerSize should be external. You should probably start inserting different MagicNumbers into regs and primers too. I think youā€™re going to need that ID as you start looking at what primers are open and closed and what type they are.

Re
D

Iā€™ve been thinking about this part. A closed main primer should never be replaced by another main primer at the same step, but we now know that we should re-open secondary primers to get profits from each retracement (and sub-primers).

If we set a variable, channelBottom, to open rate for the first short primer (as opposed to manual), we can use that as a base calc for channel extensions as well. I suggest that we firstly use this variable to stop regular trades, this is primer countrym no regs below. Then we use it to calculate replacements for sec and sub-primers on retracements. So far Iā€™ve changed my channelBottom variable to SL for the highest short primer, but when that is taken out by SL, the channel will extend to the next primer which has caused me some problems. If we instead maintain channelBottom at the same level a large drop will create a wide rate space with no regular trades. Assuming we can get the sec/sub replacements right, that should not be as big of a problem as it used to be (in my code anyway).

So, my suggestion is this, we keep channelBottom at itā€™s opening rate until [U][B]equity[/B][/U] is back above 40%, and only then will we let channelBottom fall to whatever is the new highest primer. Granted, in a big drop that could be a long way down (I donā€™t see the exact profits the new primer setup will provide yet), but then again, a 300 pip fall wouldnā€™t lead to 300 pips worth of open orders, most of them would be pending, and as they open on rate return we would also be carrying with us quite a bit of primers, and have probably moved to a higher lot size too.

Anyone have any feedback on this? (Once I get a good wording on this I will ask M, but heā€™s really not used to ā€œthinking in codeā€ so we need to be specific about concepts to get clear answers as our needs will be different from his).

Re
D