BullCharts Forum Homepage
Forum Home Forum Home > BullCharts > BullCharts discussion
  New Posts New Posts RSS Feed: J B Volatility Profit taker
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

J B Volatility Profit taker

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

Joined: 02 Sep 2006
Location: Australia
Posts: 231
Post Options Post Options   Quote maximo Quote  Post ReplyReply Direct Link To This Post Posted: 14 Jun 2008 at 4:08pm
No the signals are not the same.   SuperTrend allows for 3 different kinds of averages to be used SMA,WMA,EMA and 3 different base levels Close, Weighted Close, Median price and also an average of all 3 together.  Which one CMC chose to use is anyones guess.. and they wont give me the code! 
Back to Top
jhubbard View Drop Down
Newbie
Newbie
Avatar

Joined: 17 Sep 2009
Location: Sydney
Posts: 10
Post Options Post Options   Quote jhubbard Quote  Post ReplyReply Direct Link To This Post Posted: 07 Feb 2011 at 11:10am
Hi Maximo,

Thanks for these indicators, they are great.  In fact, they seem almost too good to be true!  Are you sure that they don't "repaint" at all? 

Cheers,
Jeremy.
Back to Top
maximo View Drop Down
BullCharts Guru
BullCharts Guru
Avatar

Joined: 02 Sep 2006
Location: Australia
Posts: 231
Post Options Post Options   Quote maximo Quote  Post ReplyReply Direct Link To This Post Posted: 07 Feb 2011 at 11:16pm
G'day Jeremy,
 
I've updated the code, more accurate and simplified, no repaint. 
 
 

[Description="SuperTrend - Max"]

[target=price]

Mult:=Input("ATR Multiplier",3,1);

Nb:=Input("Nb Periods",8,1);

method:=inputma("Method",Wilders);

price:=Input("1=Median, 2=Close",1,1);

TruRan:=ma(ATR(1),Nb,method)*Mult;

HiLimit:=if(price=1,(H+L)/2-TruRan,C-TruRan);

LoLimit:=if(price=1,(H+L)/2+TruRan,C+TruRan);

LB:=If(HiLimit>=PREV and HiLimit<C,HiLimit,If(C<PREV,HiLimit-0.1,PREV));

UB:=If(LoLimit<PREV and LoLimit>C,LoLimit,If(C>PREV,LoLimit+0.1,PREV));

Trend:=if(UB>ref(UB,-1),1,if(LB<ref(LB,-1),-1,prev));

[drawundefined=gap]

[Color=lime green]

if(Trend=1 and hist(Trend,1)=-1,LB,if(Trend=-1,UB,undefined));

[Color=red]

if(Trend=-1 ,UB,if(hist(Trend,1)=1 ,LB,undefined));

[Color=lime green]

if(Trend=1 or Trend=0,LB,undefined);

{ Paint bars}

Flag:=input("PaintBars On=1, Off=0",0,0,1);

[linestyle=pricecolor; color=rgb(98,217,98)]

If(Trend=1 and Flag=1,1,if(Flag=0 and C>O,1,undefined));

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

If(Trend=-1 and Flag=1,1,if(Flag=0 and C<=O,1,undefined));



Edited by maximo - 09 Feb 2011 at 2:04am
Back to Top
jhubbard View Drop Down
Newbie
Newbie
Avatar

Joined: 17 Sep 2009
Location: Sydney
Posts: 10
Post Options Post Options   Quote jhubbard Quote  Post ReplyReply Direct Link To This Post Posted: 09 Feb 2011 at 1:10pm
Thanks Maximo, much appreciated.  I'm doing some backtesting at the moment - will let you know if I find anything worth while!

Cheers,
Jeremy.
Back to Top
 Post Reply Post Reply Page  <1 234

Forum Jump Forum Permissions View Drop Down

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