BullCharts Forum Homepage
Forum Home Forum Home > BullCharts > BullScript
  New Posts New Posts RSS Feed: 3-bar breakouts
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

3-bar breakouts

 Post Reply Post Reply Page  <123>
Author
Message / View First Unread Post
maximo View Drop Down
BullCharts Guru
BullCharts Guru
Avatar

Joined: 02 Sep 2006
Location: Australia
Posts: 232
Post Options Post Options   Quote maximo Quote  Post ReplyReply Direct Link To This Post Posted: 27 Nov 2008 at 12:20pm
Good work Peter!
 
The crude oil chart  works well with the 3 line break :)
I can only suggest that multiplying your signal period by 5 (days/bars) in a week to overlay a weekly perspective should work.
 
I fiddled with the ribbon code and came up with a shorter version of no redundant signals.
Don't ask me why bullscipt allows redefining of the Signal variable as I have no idea..

[Description="Breakout Signals"]

[Target=Price]

n := input("Breakout periods",5,0);

SigLong := High > hist(HHV(H,n),1);

SigShort := Low < hist(LLV(L,n),1);

Signal:= If(SigLong = True,1,If(SigShort = True,-1,prev));

[linestyle=marker; marker=long; name=""]

If(hist(Signal,1)<>1,Signal=1,undefined);

[linestyle=marker; marker=short; name=""]

If(hist(Signal,1)<>-1,Signal=-1,undefined);



Edited by maximo - 27 Nov 2008 at 12:21pm
Back to Top
peter1 View Drop Down
Regular
Regular


Joined: 27 Aug 2008
Location: Sydney
Posts: 56
Post Options Post Options   Quote peter1 Quote  Post ReplyReply Direct Link To This Post Posted: 27 Nov 2008 at 12:29pm
[Excuse my repeated posts, but the SPI is going sideways and Maximo has me thinking.]
 
One idea how you might use these signals as part of a strategy.
The larger timeframe indicates the trend and the lower timeframe is used for entries and exits.
 
Back to Top
peter1 View Drop Down
Regular
Regular


Joined: 27 Aug 2008
Location: Sydney
Posts: 56
Post Options Post Options   Quote peter1 Quote  Post ReplyReply Direct Link To This Post Posted: 27 Nov 2008 at 12:44pm
We could include another input variable so that we can alter the entry and exit breakout signals.
eg. Entry signal is done on 3 bar breakout with exit done using 2 bar breakout.
 
This leads me to contemplate using an atr breakout instead of (or with) a 3 bar breakout. We could then define the breakout as a move greater than 2 x atr(10) from a pivot low or pivot high.
 
[PS. This forum may be at the top of the endangered species list but there is still some life in it. ]
Back to Top
maximo View Drop Down
BullCharts Guru
BullCharts Guru
Avatar

Joined: 02 Sep 2006
Location: Australia
Posts: 232
Post Options Post Options   Quote maximo Quote  Post ReplyReply Direct Link To This Post Posted: 27 Nov 2008 at 12:46pm

Yes I see going only with the longer term trend is usally more profitable than going against it.  ie. only take a position when your ribbon confirms.   No long positions were confirmed so the probability is better for the short side trades at the moment.      

Also agree that increased price volatility often preceeds a change  in trend.   Guppy has his momentum minute entries based on increased volatility, largest bar size/range in N bars. 
 
Originally posted by peter1

 We could then define the breakout as a move greater than 2 x atr(10) from a pivot low or pivot high.
 
Could add some kind of ATR line for this based on the highs & lows.   


Edited by maximo - 27 Nov 2008 at 6:12pm
Back to Top
maximo View Drop Down
BullCharts Guru
BullCharts Guru
Avatar

Joined: 02 Sep 2006
Location: Australia
Posts: 232
Post Options Post Options   Quote maximo Quote  Post ReplyReply Direct Link To This Post Posted: 27 Nov 2008 at 4:51pm

Hmm I see Jim Berg has done the work for us in this area, so i will just tack it onto our indicator.     You can see his stoploss uses 2*atr(10) and this adds some risk management to it including earlier possible sign of reversal or entry into a new trend.   I've included paintbars so it looks pretty :P

[ps: get the paddles out.. the forum is flat lining]
 
 
[Description="Breakout Signals"]

[Target=Price]

n := input("Breakout periods",5,0);

SigLong := High > hist(HHV(H,n),1);

SigShort := Low < hist(LLV(L,n),1);

Signal:= If(SigLong = True,1,If(SigShort = True,-1,prev));

[linestyle=marker; marker=long; name=""]

If(hist(Signal,1)<>1,Signal=1,undefined);

[linestyle=marker; marker=short; name=""]

If(hist(Signal,1)<>-1,Signal=-1,undefined);

[linestyle=pricecolor]

[color=rgb(98,217,98)] {lime green}

Signal=1;

[color=rgb(226,118,118)] {red}

Signal=-1;

[Description="Jim Berg vstop"]

al := input("ATR Period", 10, 1);

am := input("ATR Multiplier", 2, 0);

[linestyle=solid; name=Stop; color=Blue]

ts := hhv(C-am*ATR(al),15);

ts;



Edited by maximo - 27 Nov 2008 at 10:47pm
Back to Top
peter1 View Drop Down
Regular
Regular


Joined: 27 Aug 2008
Location: Sydney
Posts: 56
Post Options Post Options   Quote peter1 Quote  Post ReplyReply Direct Link To This Post Posted: 27 Nov 2008 at 9:44pm
You are getting fancy now with the TS and painted bars. Here is your latest work on the same chart.
 
[ps: All clear........ ker thunk.......  no pulse, increase the voltage and again....]
Back to Top
peter1 View Drop Down
Regular
Regular


Joined: 27 Aug 2008
Location: Sydney
Posts: 56
Post Options Post Options   Quote peter1 Quote  Post ReplyReply Direct Link To This Post Posted: 27 Nov 2008 at 9:48pm
Just noticed, that the colour coded bars makes the markers redundant.
It is also looking like the Tradeguider charts with their short term trending system turned on.
Back to Top
peter1 View Drop Down
Regular
Regular


Joined: 27 Aug 2008
Location: Sydney
Posts: 56
Post Options Post Options   Quote peter1 Quote  Post ReplyReply Direct Link To This Post Posted: 28 Nov 2008 at 2:34pm

Maximo: Thanks to your coding I have been able to modify the original 3barBO indicator.
The breakout marker is now based on a move greater than a multiple of an atr value.
  high >  (LLV of past 5 bars + 2*atr(10)) and the opposite for the sell trigger.

When you see the comparison with the original 3barBO ribbon you notice a slight improvement. Many small 3barBO's have not triggered the marker.

The next step is to display the buy/sell triggers on the chart but only over the last bar, so we can plan the weeks orders in advance.

Thank you for you input, Maximo. I hope you can appreciate how you made a huge contribution.

[ I can feel a weak pulse, put the forum in the intensive care unit and we will see if it recovers.]

Back to Top
jalna View Drop Down
Regular
Regular


Joined: 31 Mar 2007
Posts: 95
Post Options Post Options   Quote jalna Quote  Post ReplyReply Direct Link To This Post Posted: 28 Nov 2008 at 2:51pm
Hi Guys, terrific stuff. I have been following this thread with interest. Peter could you post the new formula please. Its looking good. I can't work out how to write even that
I have been waiting for Day to finish off the VSA code but he is too busy now as BC are changing servers.
I want to finish off the code so he is sending me a code example using the Icons BC already has available eg cross, arrows etc so look forward to getting that.
I wish i had a brain like Maximos, Maximo your the man
Back to Top
peter1 View Drop Down
Regular
Regular


Joined: 27 Aug 2008
Location: Sydney
Posts: 56
Post Options Post Options   Quote peter1 Quote  Post ReplyReply Direct Link To This Post Posted: 28 Nov 2008 at 3:15pm
[Hey Maximo, I detect another heart beat.]Smile
 
Hi Jalna, hope you are not looking for the "Holy Grail" indicator.  A solid understanding of VSA will serve you much better than any indicator.
This is still a work in progress and I may post formula when finished. 
Trading without a plan is a wealth hazard.
 
-----------------------
Fiddling with the parameter inputs allows me to select the optimal combo for each chart.
This combo shows breakouts based on price movement greater than 3*atr(10) from the High/Low of the past 10 bars.
 
You would have to agree this combo does a great job on this chart.
Don't mention the problems in over optimising. My trading experience will prevent that. This marker is just a tool.
Back to Top
 Post Reply Post Reply Page  <123>

Forum Jump Forum Permissions View Drop Down

Bulletin Board Software by Web Wiz Forums® version 9.69
Copyright ©2001-2010 Web Wiz