The finest in trend trading

Right now I attempting to write a CTL computer program as a slopemeter for the mid Bollinger band. :smiley:

It is tricky but I think I will eventually get it correct if I can figure out the difference between ā€œbeginā€, ā€œdo beginā€ and just ā€œdoā€. :confused:

These are instructions to do repeat operations.

This is a GFT program and we will need [B]IronHeart [/B]to convert it to MT4.

Sure thing Tymen, I eat indicators for breakfast, lunch and as three-course gourmet meals.

:smiley:

(Yes, this is my sense of humour).

Here is a lovely EUR/USD 15 min trade using the shortcut BB DNA method.
This trade is developing as I post >>>

Candle A is the signal candle.
Here the first BB expansions start, the mid BB is going up and candle A has passed thro the upper BB.

We cannot enter, however, until candle B, further up the track. :frowning: :frowning:
This is because Candle B is the first candle where the price action passes thro the 1.5 dev. BB. (shown on the chart).

The price action then goes up nicely and we smile. :slight_smile:
After entry, it seems safe to add an extra lot at candle C and another one at candle D.
After that we had better leave it alone.

This method seems to offer 2 extra opportunities to add an extra lot.

The parabolic sar tracks the price action nicely and there is an inversion further up where we extend the stoploss line - line E.

Lets look at an update of this chartā€¦

Here we have the conclusion >>>

The close of candle E has passed thro the stoploss extension line.

Hence we exit at this close.

If no extra lots were added then we make 53 pips in 2 hours 45 minutes.

One extra lot would have added 27 more pips but a 2nd extra lot would bring a loss on that lot of -1 pip.

Therefore a full trade would have netted us a total of 79 pips. :slight_smile: :slight_smile:

Very nicely done, Tymen. I was watching these today on the 15m charts but wussed out of trading them. Still trying to get it all sussed out in my head; I think I trade better once I have the complete rules for any system in a PDF form, printed out and sitting next to me till I get it down pat.

Hi, ok Iā€™ve started to try and put all the theory that Iā€™ve been reading into some demo trades. Iā€™ve been trading for some time but I would like to say that learning this new technique has been very enjoyable and Iā€™d love to get to the point where I might be able to run it alongside my other trading strategies.

ā€¦anyway, Iā€™d really appreciate any comments on these demo trades, thanks.

There are 4 trades marked A,B,C,D. The Xā€™s mark the extreme candle and where my PCI SL is placed. The blue lines are my entry points. The currency pair is the USD/CHF on a 30min chart.

TRADE A: SHORT FAIL
The extreme candle was one of those that goes right through the mid BB and could have just been left as a no trade. Two reasons why I took it 1- we were in a BB squeeze and 2- the BBā€™s were flat.
I cut the candle in half but the next candle failed to hit my entry and went without me (see i)

TRADE B: LONG SL 20pips, TP1=16pips, TP2=40pips, TOTAL 56pips profit.
Extreme candle getting right out to the 3.3 BB this time, again big candle that I put the entry in the middle. After hitting TP1 I moved SL to BE. Closed out TP2 as it hit the other BB.

TRADE C: SHORT SL 30pips, TP1=20pips, TP2=49pips, TOTAL 69pips profit.
Entry this time was possible at the wick end of the extreme candle which is smaller than the preceding candle, and BBā€™s flat. TP1 hit quickly and SL moved to BE but had to bite my nails for a bit before collecting TP2 and even then it was only just :eek: (just is good enough :smiley: )

TRADE D: SHORT SL 20pips, TP1=39pips, TP2 not reached closed out trade at ii for 20pips. TOTAL 59pips profit.
Again the extreme candle so big that I had to cut it in half, the opposite BB was flat at the point of entry. TP1 reached fairly quickly, but TP2 never came so I closed out the trade, anyway it was way past my bedtime :smiley:

So an interesting experience that actually netted 175pips when all the spreads are deducted, I pay 3pips for this pair.

Again if you can help me in any way, if Iā€™m missing something glaringly important , please let me know, good trading to you all.

Joel S. as per advice to another Joe - just a dozen or so posts ago - You will likely find answers to all your questions as you go through the thread.

No shortcuts - as they will likely do more harm than good.

Thanks for the reply.

I would really want others to comment on your trades since that would be a good excercise for them.

It is late for me and I have to go to bed, but as I see it you have 2 sets of BB loaded on your chart.
There is absolutely no need for this unless you are going to use the 2nd set.

So get rid of the redundant set and you will have a better picture. :slight_smile:

Tymen, you are correct that CTL is both confusing and not particularly intuitive. Like any language the syntax has to be exact.

[U]FOR loops[/U]
If you have only a single line of code to execute after a FOR statement, you only need a DO, and the line of code ends with ā€œ;ā€ This is then the end of the FOR loop.
eg.
for j := 1 to 12 do
M1_C[j] := C_A;

If you need multi-lines of code after your FOR statement, then you will need a DO BEGIN. After the last line of code you the need ā€œend;ā€ to complete the FOR loop.
eg.
for j := 1 to 12 do begin
M1_hi[j] := 0;
M1_lo[j] := 0;
M1_C[j] := 0;
M1_O[j] :=0;
end;

[U]IF statements[/U]
as in the FOR loop, it depends if you have more than one line of code to execute after the FOR statement.

eg1
if tmp6[i] > 0.02 then
tmp6[i] := 0.02;

eg2
if hi[1] > line[14-loop1] then begin
hi_line := line[14-loop1];
hi_numb:= 14-loop1;
end;

I hope this helps and simplifies the syntax of CTL

Ken.

This will be started on soon.
I am now working on the very last thing for this BB DNA method - the Ultimate BB Profit Snatcher.

After this, its high time we started the PDFā€™s. :slight_smile: :slight_smile:

Well, the computer code for the mid BB slope_meter is now working. :slight_smile: :slight_smile:

It just needs a few fine touches to stop it from bouncing around.
There is something slightly wrong with the way I coded the iteration function.
Here is the first effort code - [U]do not use it!![/U]

But while I am asleep, someone on the other side of the planet may see where I am slightly wrong and can make an improvementā€¦


indicator AA_BB_slope_meter ;

draw zeroline(ā€œzerolineā€, solid_line, dark_magenta,2),
res(ā€œslopemeterā€, solid_line, blue,2);

vars i(number),avg(series);

begin
zeroline := makeseries (front(close), back(close), 0);
avg := sma(close,20);
for i := front(close) to back(close) do
res[i] := avg[i+1] - avg[i];
end.


A couple of entry lines have to be added also - one for long and one for short. :slight_smile:

tymen: (in your eur/usd m15 example, on the previous page)

its interesting to note that on your chart there is clearly a close below the psar stop loss, whilst it is invertedā€¦

but on my chart that candle you exited on, didnt close below the psar stop loss, meaning i would still be in this tradeā€¦as the psar is still inverted on my screen, and price still hasnt touched the midd bbā€¦although getting very close.

even when it does hit mid bb, it will still be about an extra 8 pips, meaning that your 2nd lot that was -1ā€¦would now end +5 or +6 :slight_smile:

i have also noticed today that using a h1 TF to enter a BB walk might cause problems, as if we exit once a candle closesā€¦when the opposite BB contracts (whilst the psar is in standard form) it really can eat into profits or cause a lossā€¦(eur/gbp h1 today is a good example)

you seem to be showing examples on the m15 + m30 TFā€¦is that the reason for this?..as we dont have to wait so long for a candle to closeā€¦in order to see if the opposite BB is starting to contract?

Thanks will do, sleep well.

Thanks heaps, [B]Ken doubleU[/B]!! :slight_smile: :slight_smile:

As you can see, I have written the code already but what you give here is very helpful indeed because it is not in the GFT manual.

You may now want to check my script - I think I may needā€¦

for i := front(close) +1 to back(close) do

ā€¦I have added ā€œ+1ā€ after the ā€œfront(close)ā€ ā€¦

The function works well but shuts down towards the end of the chart for some reason and it has to do with the [i] operation.

At describing what I see - - Please note - I am beginner with DNA - and so these are my thoughts nothing more.

Iā€™ll post a couple general thoughts here - then within your text add some more comments. Thanks for reading

Generally - from your post I get the feel, that you are demoing; sort of simply taking every available CBL. The reason I say this is that youā€™re going both long and short here - where I would have thought, via checking a longer time frame - you may be locked into a - - - Iā€™m only taking shorts today, as the daily TF shows a downtrend - - mentality??? maybe this is just me and I am missing the boat??

Also - I guess I like the first two trades, as they both seem to be in a ā€˜squeezishā€™ area, where the third and fourth trades I guess Iā€™d call in the bubble, and hence not really a tradeable region - - either youā€™d already be in a trade, or you donā€™t open one.
(Again however Iā€™d only like 1 of the first two trades, the one that agreeā€™s with a longer timeframe direction)

Last general comment - I think youā€™re definitely on the right track it does look promising, doesnā€™t it

Hi Tymen

I have made some small changes to your code.

  1. I have simplified your ā€˜zero lineā€™.

  2. resolved the problem that you had at the end of the chart. This was by changing the calculation to ā€˜avg[i] - avg[i-1]ā€™. In other words it produces the difference of the ā€˜lastā€™ and the ā€˜last-1ā€™ term. ie the slope.

  3. I padded out the FOR loop calculation to allow for the sma periods.

  4. I have added an Input for the Period. This will allow you to experiment [but it is preset to 20 as you wished] with different periods via the Indicator input control setting.

  5. I have added a ā€˜kwā€™ at the end of the indicator name so that you will not overwrite yours. But please feel free to remove it, if you issue this version.

You will note that because of the different way of calculation, your plot is one candle different to my plot, if you have them both attached to a chart.

Sorry that I am unable to PM you because of my posting numbers. I do not think I can leave either an email address or a web site you could contact me via, should you feel I am able to help with any CTL coding problems. I will see an email message far quicker than a forum posting.

regards
Ken

/////////////////////////////////////////////////////////

indicator AA_BB_slope_meter_kw ;

input period = 20;

draw zeroline(ā€œzerolineā€, solid_line, dark_magenta,2) = 0,
res(ā€œslopemeterā€, solid_line, blue,2);

vars i(number),avg(series);

begin
avg := sma(close,period);

for i := front(close) + period + 1 to back(close) do
res[i] := avg[i] - avg[i-1];
end.

/////////////////////////////////////////////////////////////////

Wow Ken,

Great work, Thankyou for assisting Tymen with his GFT coding. There arenā€™t many of us who use GFT but i find it hard to use MT4 after dealbook 360. Unfortunately i have no programming skills but i really appreciate the work Tymen is doing knocking out these indicators just like all the MT4 users appreciate dodge and NB.

Hopefuly your efforts are noticed by more people, Thankyou both!!!

Ditto and Amen!

[QUOTE=ken doubleU;210191]Hi Tymen

I have made some small changes to your code.

ā€¦

ā€¦
QUOTE]

[B]ken doubleU[/B] - I cannot thank you enough!! :slight_smile: :slight_smile:

I can immediately understand your changes, esp with reference to the 20 periods - clearly you saw the problem straight away.

I am learning from you and have noted your previous post in particular!!

[B]We now have a competant CTL programmer to join us!![/B]

I am now listing you along with the other programmer/computer experts on this theadā€¦ :slight_smile:

[B]Merchantprince.
DodgeV83.
IronHeart.
Ken DoubleU[/B]

[B]Welcome aboard the experts panel on this thread!![/B] :slight_smile: