| |
|
|
Alligator
{Alligator from New Trading Dimensions by Bill Williams}
variables: Jaws(0), Lips(0), Teeth(0);
Jaws=SmoothedAverage(close, 13)[ 8];
Lips=SmoothedAverage(close, 8)[5]; Teeth=SmoothedAverage(close,
5)[3];
Plot1(Jaws, "Jaws"); Plot2(Lips, "Lips");
Plot3(Teeth, "Teeth");
|
ABillW_3Lines
value0=(h+l)/2;
{Balance Lines}
value1=Average(value0,22)[11]; value2=Average(value0,11)[6];
value3=Average(value0,6)[3];
if currentbar>=21 then begin
plot1(value1,"BLblue"); plot2(value2,"BLred");
plot3(value3,"BLgreen"); end;
|
:
ABillW_ActiveFractal
Vars: blBlue(0), blRed(0), blGreen(0), upFrac(0),
dnFrac(0), stp_now(FALSE), i1(0), maxFracsBack(10);
value0=(h+l)/2; blBlue=
Average(value0,13)[8]; {blue} blRed= Average(value0,8)[5]; {red}
blGreen=Average(value0,5)[3]; {green}
value1=Highest(h,3); value2=Lowest(l,3);
stp_now=FALSE; i1=1; while
i1<maxFracsBack and SwingLow(i1,l,2,80)<>-1 and stp_now=FALSE
begin value3=SwingLow(i1,l,2,80); if value3>BLred or
value3>value2 then i1=i1+1 else stp_now=TRUE; end;
if stp_now then dnFrac=value3 else
dnFrac=-1;
{if i1>=maxFracsBack then print(d," mehr als
",maxFracsBack," dnFracs");}
stp_now=FALSE; i1=1; while
i1<maxFracsBack and SwingHigh(i1,h,2,80)<>-1 and stp_now=FALSE
begin value4=SwingHigh(i1,h,2,80); if value4<BLred or
value4<value1 then i1=i1+1 else stp_now=TRUE; if
date=930219 then print(d," ooh ",i1,stp_now,value4);
end;
if stp_now then upFrac=value4 else
upFrac=-1;
{if i1>=maxFracsBack then print(d," mehr als
",maxFracsBack," upFracs");}
if upFrac<>0 and upFrac<>-1 then
plot1(upFrac,"upFract"); if dnFrac<>0 and dnFrac<>-1 then
plot2(dnFrac,"dnFract");
|
ABillW_FractalLine
Inputs: Strength(2);
value1=swinghigh(1,h,Strength,80);
value2=swinglow(1,l,Strength,80);
if value1>-1 then
plot1[-1](value1,"BuyFractal"); if value2>-1 then
plot2[-1](value2,"SellFractal");
|
ABillW_AC
Vars: AO(0),AC(0);
{Awesome Oscillator}
AO=Average((h+l)/2,5)-Average((h+l)/2,34);
{Accelerator/Decellerator Oscillator}
AC=AO-Average(AO,5);
if currentbar>=5 then if AC>AC[1] then
plot1(AC,"+AC") else plot2(AC,"-AC"); Plot3(0,"");
|
ABillW_AO
Vars: AO(0),AC(0);
{Awesome Oscillator}
AO=Average((h+l)/2,5)-Average((h+l)/2,34);
{Accelerator/Decellerator Oscillator}
AC=AO-Average(AO,5);
if currentbar>=1 then if AO>AO[1] then
plot1(AO,"+AO") else plot2(AO,"-AO") ; Plot3(0,"");
|
|
 |
 |
|
Adaptive
Stochastic Oscillator
{-- C 2K Tushar Chande; Adaptive Stochastic
Oscillator --}
vars: v1(0), v2(0), v3(0), v4(0) ; vars:
lenmax(28), lenmin(7), currlen(0) ; vars: hh(0), ll(0),
stoch(0), stochma(0) ;
{-- Calculate 20-day std. Dev. And its 20-day
range --}
v1 = stddev(c,20) ; v2 = highest(v1, 20) ;
v3 = lowest(v1, 20) ;
{-- Create v4: stochastic oscillator for 20-day std. dev. --}
{-- if v1=v2 (highest level) => v4 = 1; if v1=v3 (lowest level)
=> v4=0 --}
if (v2-v3) > 0 then v4 = ((v1 - v3)/(v2-v3))
Else v4 = 0 ;
{-- Calculate current effective length; if v4
= 1, then length = mininum --}
currlen =
IntPortion(lenmin + (lenmax-lenmin)*(1-v4)) ;
{-- Calculate stochastic oscillator and its
3-day exponential average --}
hh = highest(h, currlen) ; ll = lowest(l,
currlen) ; if (hh-ll) > 0 then stoch = ((close - ll)/(hh -
ll)) * 100 ; if currentbar = 1 then stochma = 0 else
stochma = 0.5*stoch + 0.5*stochma[1] ;
{-- Plot data --}
plot1(stoch, "adapt_stoch") ;
plot2(stochma, "stochma") ; plot3(80, "hi_ref") ;
plot4(20, "lo_ref") ;
{ -- End of code --}
|
|
 |
 |
|
| |
|