BullCharts Forum Homepage
Forum Home Forum Home > BullCharts > BullScript
  New Posts New Posts RSS Feed: Auto Envelopes
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Auto Envelopes

 Post Reply Post Reply
Author
Message Reverse Sort Order / View First Unread Post
Bana View Drop Down
Regular
Regular
Avatar

Joined: 02 Jan 2007
Location: Australia
Posts: 46
Post Options Post Options   Quote Bana Quote  Post ReplyReply Direct Link To This Post Topic: Auto Envelopes
    Posted: 06 Sep 2010 at 9:57am
Thanks........it works great.
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: 03 Sep 2010 at 10:21pm
Yes,  just add these 2 lines onto the end of that code.
 

[name=Envelope Fill; linestyle=fill; color=blue]

avg+channel/2; avg-channel/2;

Back to Top
Bana View Drop Down
Regular
Regular
Avatar

Joined: 02 Jan 2007
Location: Australia
Posts: 46
Post Options Post Options   Quote Bana Quote  Post ReplyReply Direct Link To This Post Posted: 01 Sep 2010 at 9:51pm
Hi Maximo

The formula in your post 159 above --- is it possible to fill the channel with any color?

cheers
Bana
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: 18 Apr 2009 at 7:46pm
I will have a read of his book :)
 
Here's a link to a report & a couple of videos which present the idea of combining all 3 market conditions into 1 trading plan using a channel.  
Actually there's also a few mechanical systems that have been using this idea for over 15 years in the live market.  eg. R-breaker + R-Levels by Richard Saidenberg and Cyclone system by Clayburg. 
 
 


Edited by maximo - 18 Apr 2009 at 11:39pm
Back to Top
Bana View Drop Down
Regular
Regular
Avatar

Joined: 02 Jan 2007
Location: Australia
Posts: 46
Post Options Post Options   Quote Bana Quote  Post ReplyReply Direct Link To This Post Posted: 13 Apr 2009 at 12:28pm
Thanks Maximo. You are a genius with Bullscript.

I am trying to follow Dr Alexander Elder's short term trading within the channels, as described in 'Come into my Trading Room.
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: 12 Apr 2009 at 11:46pm

Okay, there you go, looks okay for testing a breakout strategy.

[target=price]

EMA:=input("Base EMA",22,1);

Factor:=input("Factor",27,1);

avg:=ma(C,EMA,E);

asize:= Stdev(2*Max(Abs(H-avg) ,Abs(L-avg)) / avg,100)*Factor/10; {Use 100 days for stable channel size - default is 2.7 std}

bsize:= ValueWhen(1, DayOfWeek()<Ref(DayOfWeek() ,-1) OR ( DayOfWeek()=Ref(DayOfWeek(),-1) AND DayOfMonth() <> Ref(DayOfMonth(),-1)) ,Ref(asize,-1)); { This pegs the Stdev to last bar of week and only changes once per week}

csize:=LastValue(bsize); {fix to constant using last value}

channel:=csize*avg;

avg+channel/2;

avg-channel/2;

avg;

 

Back to Top
Bana View Drop Down
Regular
Regular
Avatar

Joined: 02 Jan 2007
Location: Australia
Posts: 46
Post Options Post Options   Quote Bana Quote  Post ReplyReply Direct Link To This Post Posted: 12 Apr 2009 at 4:52pm
Got this MS formula for the same thing from another web source. The parameters of this 
look more closer to description in the book, as compared to the previous formula so please ignore it.


EMA:=input("Base EMA", 22, 1, 100);
Factor:=input("Factor", 27, 1, 50);
avg:=ma(C,EMA,E);
csize:= Stdev(2*Max(Abs(H-avg) ,Abs(L-avg)) / avg,100)*Factor/10; {Use 100 days for stable channel size - default is 2.7 std}
Csize:= ValueWhen(1, DayOfWeek()<Ref(DayOfWeek() ,-1) OR ( DayOfWeek()=Ref(DayOfWeek(),-1) AND DayOfMonth() <> Ref(DayOfMonth(),-1)) ,Ref(csize,-1)); { This pegs the Stdev to last bar of week and only changes once per week}
csize:=LastValue(csize); {fix to constant using last value}
channel:=csize*avg;
avg+channel/2;
avg-channel/2;
avg;

Back to Top
Bana View Drop Down
Regular
Regular
Avatar

Joined: 02 Jan 2007
Location: Australia
Posts: 46
Post Options Post Options   Quote Bana Quote  Post ReplyReply Direct Link To This Post Posted: 11 Apr 2009 at 9:35am
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

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