J B Volatility Profit taker |
Post Reply | Page <1234> |
Author | |
maximo
BullCharts Guru Joined: 02 Sep 2006 Location: Australia Posts: 232 |
Post Options Quote Reply Posted: 17 Jan 2008 at 11:36pm |
brentjedi I use WealthLab and have only done a small amount of backtesting. Results of The indicator serves best as a confirmation of another entry signal like an If you would like to backtest it based on it's signals with or without other p.s. I have created a couple of other indicators that would be great for Best regards, Max |
|
Trigger
Newbie Joined: 15 Mar 2008 Location: Australia Posts: 1 |
Post Options Quote Reply Posted: 16 Mar 2008 at 1:40am |
maximo, Great indicator - it does work magnificently for trending stocks (blown my mind somewhat - didn't know Bullscript allowed an indicator to change colour. I've tweaked it a little to include the close rather than the open and gone with a 10 X 2 ATR. I'm endeavouring to backtest the indicator on TradeSim with say a CCI (21) on daily. Still learning so bear with me. Interested to hear your ADX & Williams% Oscillator/High Low Channel - Donchian Channel indicator. Cheers, Trigger |
|
maximo
BullCharts Guru Joined: 02 Sep 2006 Location: Australia Posts: 232 |
Post Options Quote Reply Posted: 28 Mar 2008 at 3:51am |
Thanks Trigger, Changing the colour of an indicator on price was a technical issue that needed to be solved. Thanks to BlackDog for his help with that: http://www.bullcharts.com.au/forum/forum_posts.asp?TID=295&a mp;KW=skin+a+cat&TPN=2 I have updated that indicator now to be as accurate to the SuperTrend indicator as created by Oliver Siban. A study found in ProRealTime which is also employed by CMC Markets software. { TrendStop } [Target =Price; LineStyle=Solid; Author=Michael, Max]TDate:= InputDate("Start Date", date(2004,12,01));HoldingDays:= BarsSince(OnOrSkipped(TDate));A:= Input("ATR Multiplier",2,1);Nb:= Input("Nb Periods",5,3);Vatr:= ma((HHV(H,nb)-LLV(L,Nb))*0.38,Nb,E);Short:= ma((H+L)*0.5,Nb,E) + A * Vatr;Long:= ma((H+L)*0.5,Nb,E) - A * Vatr;LStop := If(Long>PREV and HoldingDays,Long,If(Long<=PREV and HoldingDays,HHV(Long,10),Long));SStop := If(Short<PREV and HoldingDays,Short,If(Short>=PREV and HoldingDays,LLV(Short,10),Short));up:= if(Close<LStop and hist(Close,1) > hist(LStop,1),1,0);down:= if(Close>SStop and hist(Close,1) < hist(SStop,1),1,0);Dtrend:= if(up,1,if(down,0,prev));Utrend:= if(down,1,if(up,0,prev));LongStop := if(Dtrend and HoldingDays,Long,If(Long>PREV and HoldingDays,Long,If(Long<=PREV and HoldingDays,if(Barssince(Dtrend)<=10,HHV(Long,8),HHV(Long,15)),Long)));Shortstop := if(Utrend and HoldingDays,Short,If(Short<PREV and HoldingDays,Short,If(Short>=PREV and HoldingDays,if(Barssince(Utrend)<=10,LLV(Short,8),LLV(Short,15)),Short)));[drawundefined =gap]init:= if(Dtrend=0 and Utrend=0 and HoldingDays,1,0);[Color =lime green]if (Utrend and HoldingDays and hist(Dtrend,1)=1,LongStop,if(Dtrend and HoldingDays,ShortStop,undefined));[Color =red]if (Dtrend and HoldingDays,ShortStop,if(hist(Dtrend,1)=0 and HoldingDays,LongStop,undefined));[Color =lime green]if (Utrend and HoldingDays or init,LongStop,undefined);
|
|
maximo
BullCharts Guru Joined: 02 Sep 2006 Location: Australia Posts: 232 |
Post Options Quote Reply Posted: 28 Mar 2008 at 4:12am |
I have completed the Williams Oscillator + HiLo (dochian chan) filtered Indicator. Both these indicators work well together. Named this one TrendBars, the one above named as TrendStop. They should then appear alphabetically next to each other in list. The strategy employs the sharpest trend detection possible, so I recommend adjusting the HiLo filter period to 6 or 8 to make it less sensative to trend changes. I will post a picture to show the way I set up this combination. Even though i favour candlesticks it's better to have it set on bars, that way you can tell if the close was higher or lower, since the bars are coloured according to trend instead of Open to Close. { Trend Bars } [Description:="Williams Oscillator + HiLo Filtering"] [Target =Price; Author=Michael, Max]n := input("Williams% Period",14,1);x := input("HiLo Filter Period",3,2); {3,6,9 higher=less trades}WO := -100 * ( highest(H,n) - C) / (highest(H,n) - lowest(L,n)) + 100;LL:= If (LLV(L,x)<hist(LLV(L,x),1),1,0);HH:= If (HHV(H,x)>hist(HHV(H,x),1),1,0);SigLL:= if(LL,1,if(HH,0,prev));SigHH:= if(HH,1,if(LL,0,prev));SignalShort := If(WO < 66 and hist(WO,1) > 66 or hist(WO,1) > 33 and WO < 33,1,0);SignalLong := If(WO > 33 and hist(WO,1) < 33 or hist(WO,1) < 66 and WO > 66,1,0);SigLong := if(SignalLong,1,if(SignalShort,0,prev));SigShort := if(SignalShort,1,if(SignalLong,0,prev));SL:= If(SigLong and SigHH,1,0);SS:= If(SigShort and SigLL,1,0);[linestyle =pricecolor][color =rgb(98,217,98)] {lime green}SLb:= If(SL,1,if(SL=0 and SS=0,prev,0));SLb; [color =rgb(226,118,118)] {red}SSb:= If(SS,1,if(SS=0 and SL=0,prev,0));SSb; {Profit Take} PTflag:= input("Profit Take (1=On, 0=Off)",1,0,1);PTL:= if(C-LLV(L,13) > 6*hist(ATR(4),13),1,0);PTS:= if(HHV(H,13)-C > 6*hist(ATR(4),13),1,0);[linestyle =marker; marker=type2; name=P]if (PTflag and PTL and hist(PTL,1)=0 and SL,1,0);[linestyle =marker; marker=type1; name=P]if (PTflag and PTS and hist(PTS,1)=0 and SS,1,0);{Stops and Target} [drawundefined =gap][linestyle =dotted; color=blue]{HighestHigh3 & LowestLow3 weighted ATR stop} AP:= H/2+prev(O,1)/2;[color =rgb(98,217,98)] {lime green}hiband:= ma((AP-1.33*ATR(4) + LLV(L,x)*2)/3,2,S);if (SLb,HHV(hiband,3),undefined);[color =rgb(226,118,118)] {red}loband:= ma((AP+1.33*ATR(4) + HHV(H,x)*2)/3,2,S);if (SSb,LLV(loband,3),undefined);{Entry Bar Stop} [linestyle =points; color=red]if (SLb and Hist(SSb,1),L-(L/100)*0.15,undefined);if (SSb and Hist(SLb,1),H+(H/100)*0.15,undefined);[linestyle =points; color=cyan]{save limit entry prices} LE:= if(SLb and Hist(SSb,1),C,0);SE:= if(SSb and Hist(SLb,1),C,0);if (LE,LE+1*hist(ATR(6),1),undefined);if (SE,SE-1*hist(ATR(6),1),undefined);
|
|
maximo
BullCharts Guru Joined: 02 Sep 2006 Location: Australia Posts: 232 |
Post Options Quote Reply Posted: 28 Mar 2008 at 4:30am |
I have yet to do work on the ADX system, but here's the above indicator combination displayed. |
|
brentjedi
Regular Joined: 13 Dec 2007 Posts: 34 |
Post Options Quote Reply Posted: 31 Mar 2008 at 12:00am |
Hi MAXIMO
I must say you and black dog are geniuses with BS. How did you do it?, are you programmers ?. Their seems to be a big hole for BS know how. In any case I would like to ask you if you could help me with this problem. I am using a ROC indicator greater than value, if true then it flags a buy setup trigger.eg ROC(C,10,%) >1 this I can do easy. However I want to use tradeslim or scan where the above is true and price has closed above the bar that triggered the ROC. any suggestions? I have the ROC as a 1,0 in a seperate panel at the bottom. Cheers Brentjedi |
|
Trading is art of self
|
|
maximo
BullCharts Guru Joined: 02 Sep 2006 Location: Australia Posts: 232 |
Post Options Quote Reply Posted: 31 Mar 2008 at 4:11pm |
LoL! I do have a programming background in assembler, that doesn't really help. Bullscript is quick to tell you you've made a mistake, so more than anything it's like a spoken language. You learn 1 word at a time and just build on that. Look at other indicators etc. Don't think i can help you with Tradesim as i don't have it. Can do a scan for them though. I made an indicator firstly. Then made a new scan name ROC 10. The scan criteria = Category: [Indicator is a signal] select: Rate Of Change (which is the following formula name). Interestingly it doesn't bring them all up like VPG should have been found.. but it wasn't. So hope that helps.
n := input("Enter the ROC length", 14, 7, 52);x := roc(C,n,PERCENT);x; [linestyle =marker; marker=type2; name=x]if (hist(x<10,1) AND x>10,1,0);
|
|
brentjedi
Regular Joined: 13 Dec 2007 Posts: 34 |
Post Options Quote Reply Posted: 05 Apr 2008 at 10:50pm |
Hi MAXIMO
Thank you, I can now get the makers up saying buy or sell when the formula = true. However I was hoping for a line above or below the trigger bar that stretched say three bars. As I use the formula = true to highlight the bar and if the high or low is broken by the next bar, I would go long or short. thanks again Cheers Brentjedi |
|
Trading is art of self
|
|
maximo
BullCharts Guru Joined: 02 Sep 2006 Location: Australia Posts: 232 |
Post Options Quote Reply Posted: 10 Apr 2008 at 12:18am |
Hiya Brentjedi I modified it a bit to show the direction of the following bar using a marker, though you may want to apply it to the chart and change it to a line. Looks like the Barssince Function will do the job of pinpointing how ever many bars after the signal you want to indicate with a line or marker. Many good signals from it and I hope your backtesting is going well. n := input("Enter the ROC length", 14, 7, 52);method := inputroc("Enter the ROC method",PERCENT);x := roc(C,n,PERCENT);x; [linestyle =marker; marker=type2; name=x]condition:= if(hist(x<10,1) AND x>10,1,0);condition; [linestyle =marker; marker=long; name=""]if (hist(barssince(condition),0)=true and H>hist(H,1),1,0);[linestyle =marker; marker=short; name=""]if (hist(barssince(condition),0)=true and L<hist(L,1),1,0);
Edited by maximo |
|
loop4ever
Newbie Joined: 13 Jun 2008 Posts: 1 |
Post Options Quote Reply Posted: 13 Jun 2008 at 9:46pm |
Maximo, is the TrendStop code you posted give the exact same signal as the CMC MarketMaker SuperTrend indicator?
|
|
Post Reply | Page <1234> |
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 |