PureBytes Links
Trading Reference Links
|
Brian,,
Here is a formula I have for expansion and contraction using Bollinger
Bands, Load into Indicator Builder. As for your previous code, I will
take a look and get back to you.
Anthony
//Bollinger Bands with Expansion and Contraction
//HIGHLIGHTS
// Contraction Color: Blue
pds=28;//bollinger bands periods
shift=2;//bollinger band shift
ChartStyle=64;//Main chart style ex.64 = candlestick, 128=Bar
chart,1=line.
Cond1= BBandTop(Close,pds,shift)< Ref(BBandTop(Close,pds,shift),-1) AND
BBandBot(Close,pds,shift)>Ref(BBandBot(Close,pds,shift),-1);
// Expansion Color: Red
Cond2= BBandTop(Close,pds,shift)> Ref(BBandTop(Close,pds,shift),-1) AND
BBandBot(Close,pds,shift)<Ref(BBandBot(Close,pds,shift),-1);
barcolor=IIf(Cond1,6,IIf(Cond2,4,0));
Graph0=BBandTop(C,pds,shift);
Graph1=C;
Graph1Style=ChartStyle;
Graph2=BBandBot(C,pds,shift);
Graph0Style=Graph2Style=1;
Graph0BarColor=Graph2BarColor=ValueWhen(barcolor!=0,barcolor);
Brian Elijah wrote:
> I was looking to find volatility or extreme tightness/contraction with
> the bands. This exploration returned no stocks
>
> Basically I wanted yesterday to be the point of lowest distance
> between the bands over the past 10 days- How can I adjust this AFL.
>
> Thanks in Advance,
>
> Brian
>
>
>
> bbtop = BBandTop(Close, 35, 2);
>
> bbbot = BBandBot(Close, 35, 2);
>
> Yesterdaybbtop = Ref( MA( bbtop, 50 ), -1 );
>
> Yesterdaybbbot = Ref( MA( bbbot, 50 ), -1 );
>
> Yesterdaybbtopp = Ref( MA( bbtop, 50 ), -10 );
>
> Yesterdaybbbott = Ref( MA( bbbot, 50 ), -10 );
>
> bandlow = LLV( MA( bbtop, 50 ), -1 );
>
> bandhigh = HHV(MA( bbbot, 50 ), -1 );
>
> bandlowa = LLV( MA( bbtop, 50 ), -10 );
>
> bandhighb = HHV(MA( bbbot, 50 ), -10 );
>
> Filter = Close > 0 AND Close < 25 AND Volume > 5000 AND
> (Yesterdaybbtop + Yesterdaybbbot < Yesterdaybbtopp + Yesterdaybbbott)
> AND (bandlow + bandhigh) < (bandlowa + bandhighb);
>
> NumColumns = 4;
>
> Column0 = Close;
>
> Column0Name = "Close";
>
> Column1 = Volume;
>
> Column1Name = "Volume";
>
> Column2 = RSI();
>
> Column2Name = "RSI";
>
> Column3 = ADX();
>
> Column3Name = "ADX";
>
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
|