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

[amibroker] Re: Help with Indicator/Exploration formula



PureBytes Links

Trading Reference Links

Hi Dick,

Check your email I've just sent you my version of the zerolag
indicator that have the Buy/Sell arrows you saw on my site.


Thanks

Mike

www.amibrokerfan.com




--- In amibroker@xxxxxxxxxxxxxxx, "areehoi" <rhoierman@xxx> wrote:
>
> I'm trying to get this indicator/exploration to show Buy/Sell signals
> (up ?down arrows) on the indicator and Buy /Sell results on the
> exploration.  Any ideas on how this might be accomplished will be most
> appreciated. 
> 
> Dick H
> (watch for wrap)
> 
> /*ZeroLag W%R*/
> "========";
> 
> GraphXSpace = 3;
> 
> R = ((HHV(H,14) - C) /(HHV (H,14) -LLV (L,14))) *-100;
> 
> MaxGraph=10;
> Period= 10;
> EMA1= EMA(R,Period);
> EMA2= EMA(EMA1,5);
> Difference= EMA1 - EMA2;
> ZeroLagEMA= EMA1 + Difference;
> PR=100-abs(ZeroLagEMA);
> 
> Graph0=PR;
> 
> MoveAvg=MA(PR,5);
> 
> 
> //Graph1=MoveAvg;
> 
> //Graph1Color=colorTan;
> //Graph0Style=4;//Thick
> MovAvg=MA(PR,5);
> Plot(MA(PR,5),"ZLTrig",colorBlue,styleLine,7,4);
> 
> upbar= PR>= MoveAvg AND PR>= Ref(PR,-1) ;
> downbar=(PR < MoveAvg) OR PR>= MoveAvg AND PR< Ref(PR,-1) ;
> barcolor = IIf( downbar,colorRed, IIf( upbar, colorBrightGreen, 7));
> Graph0BarColor = ValueWhen( barcolor != 0, barcolor );
> //dynamic_color = IIf( downbar,colorRed, IIf( upbar, colorBrightGreen,
> 7));
> //Plot(PR,"ZeroLag", Color = ValueWhen( dynamic_color != 0,
> dynamic_color ));
> 
> //Graph2=30;
> //Graph3=70;
> HLine =  Param( "Upper Line" , 70, 60,95, 5);
> LLine = Param( "Lower Line", 30, 5, 40, 5);
> Plot( Lline, "", colorPlum,styleLine|styleDashed ); 
> Plot( Hline, "", colorPlum,styleLine|styleDashed ); 
> 
> 
> Graph2Style=Graph3Style=Graph4Style=1;//normal
> Graph4Color=2;
> Graph2Color=5;
> Graph3Color=4;
> 
> Graph5=0;
> Graph6=100;
> Graph5Style=Graph6Style=1;
> Graph5Color=Graph6Color=2;//custom
> Buy = Cross(Upbar, MA(PR,5));
> Sell = Cross (MA(PR,5), upbar);
> Buy = ExRem(Buy,Sell);
> Sell = ExRem(Sell,Buy);
> PlotShapes(Buy* shapeUpArrow,colorGreen);
> PlotShapes(Sell* shapeUpArrow,colorRed);
> 
> Title=Name()+"  < ZeroLag W%R :"+WriteVal(PR)+"%";
> 
> Filter = C <40 AND C >2 AND C> Ref(C,-1)AND Volume > 80000;
> Result = WriteIf(Buy,"Buy","Sell");
> AddTextColumn( WriteIf(Buy,"Buy", "Sell" )
> ,"TRADE",5,IIf(Buy,colorYellow, colorWhite), IIf(Buy, colorDarkGreen,
> colorDarkRed) );
> AddTextColumn(IndustryID(1) ,"     Industry Sector      ", 25.0,
> colorWhite, colorBlue);
> AddColumn( Close, "Close", 1.2, IIf( ROC(C, 1 ) >= 0,
> colorDarkGreen,colorRed ),50 );
> AddColumn(Ref(Close,-1),"Y-Close",1.2, IIf(
> ROC(Ref(C,-1),1)>=0,colorDarkGreen, colorRed ),50 );
> AddColumn( Volume, "Volume", 10.0, IIf( ROC(V, 1 ) >=
> 0,colorDarkGreen, colorRed ) );
> AddColumn( ROC( Close, 1 ), "ROC(1)", 1.2, IIf( ROC(C, 1 ) >=
> 0,colorDarkGreen, colorRed));
> 
> Title=Name()+"  < ZeroLag W%R :"+WriteVal(PR)+"%";
>



Content-Description: "AVG certification"
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.15.15/579 - Release Date: 12/7/2006 1:31 PM