![]() |
J B Volatility Profit taker |
Post Reply
|
Page <1 234 |
| Author | |
maximo
BullCharts Guru
Joined: 02 Sep 2006 Location: Australia Posts: 231 |
Post Options
Quote Reply
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!
|
|
![]() |
|
jhubbard
Newbie
Joined: 17 Sep 2009 Location: Sydney Posts: 10 |
Post Options
Quote Reply
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. |
|
![]() |
|
maximo
BullCharts Guru
Joined: 02 Sep 2006 Location: Australia Posts: 231 |
Post Options
Quote Reply
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 |
|
![]() |
|
jhubbard
Newbie
Joined: 17 Sep 2009 Location: Sydney Posts: 10 |
Post Options
Quote Reply
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. |
|
![]() |
|
Post Reply
|
Page <1 234 |
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |