[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [amibroker] Did one of you guys...



PureBytes Links

Trading Reference Links

Gilles There is a Williams %R in the Amibroker online code file listing.  Below is a similar one which was developed by someone else on this board.  The online code is similar to the one below but the one below has some interesting additions concerning divergences. Hope this helps. Steve At 06:54 PM 11/10/2001 +0000, you wrote: Did one of you , once upon a time, translate the William's %R indicator in AFL? I'd like to test it, but I know nothing about computer programing...Just a question! :) Gilles Greetings to Thomas, Marek, Dimitri...Guys how can you manipulate these languages so easily??? /* %R, ema 9 and divergences */ MaxGraph=5; R=-100*((HHV(High,14)-Close))/(HHV(High,14)-LLV(Low,14)); DIVR=(R-Ref(R,-1))*(C-Ref(C,-1)); DIVB=IIf((DIVR<0) AND (R-Ref(R,-1))>0 AND (Ref(R,-1)<-90),-100,0); DIVB1=IIf((DIVR<0) AND (R-Ref(R,-1))>0 AND (Ref(R,-1)<-90),-80,0); DIVS=IIf((DIVR<0) AND (R-Ref(R,-1))<0 AND (Ref(R,-1)>-10),-20,0); Graph2=DIVB1; Graph2Style=2; Graph2BarColor=0; Graph0 = R; Graph0BarColor=12; Graph1=EMA(R,9); Graph1BarColor=3; Graph2=DIVB1; Graph2Style=2; Graph2BarColor=0; Graph4=DIVB; Graph4Style=2; Graph3=DIVS; Graph3Style=2; Graph4BarColor=8; Graph3BarColor=4; Title=Name()+" - %R="+WriteVal(LastValue(R))+ WriteIf(DIVB==-100,"     POSITIVE DIVERGENCE"," ")+ WriteIf(DIVS==-20,"     NEGATIVEDIVERGENCE",""); Buy= Ref( (DIVB==-100 OR DIVS==-20),-10) AND C*1.05>Ref(C,-10); Sell=0; /* The following code is the exploraiton code */ Filter= Ref( (DIVB==-100 OR DIVS==-20),-10) AND C*1.05>Ref(C,-10)  ;      NumColumns = 5; Column0 = IIf(DIVB==-100,1,IIf(DIVS==-20,-1,0) ); Column0Format = 1.2; Column0Name = "Trigger Price"; Column1 = C; Column1Name = "Close       "; Column1Format = 1.2; Column2 = MA(V,17); Column2Name = "17 Ma Vol   "; Column2Format = 1.0; Column3 = MA(C,17)/MA(C,50); Column3Name = "% 17/50 "; Column3Format = 1.2; Column3Format = 1.2; Column4= MA(C,17); Column4Name="17 C ma"; Column4Format = 1.2; Column4= MA(C,50); Column4Name="50 C ma"; Column4Format = 1.2; /*  End of Exploration Code. */