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

Re: [amibroker] Re: Help



PureBytes Links

Trading Reference Links







Ernie,
 
Unfortunately, I do not have the Trin calculated using the built-in function....But I assure you the formulas should work...( unless I am missing something )....
 
I have the NDX100 and componets in a separate watchlist and calculate the Adv_Issues , Dec_Issues, Adv_Vol and Dec_Vol , New Highs and New Lows using the AddToComposite function and the following formula:
 
load into AA window, select watchlist containing the Ndx100 and componets, Range =all quotations , and click Scan....
//Composite ADV /DECL NDX100
Advv = IIf(C>Ref(C,-1),V,0);
Decv = IIf(C<Ref(C,-1),V,0);
AdvI = IIf(C>Ref(C,-1),1,0);
DecI = IIf(C<Ref(C,-1),1,0);
NewHighs=IIf(H > Ref(H,260),1,0);
Newlows=IIf(L < Ref(L,260),1,0);
AddToComposite(NewHighs,"~ndx100NewHighs","h");
AddToComposite(NewLows,"~ndx100NewLows","l");
AddToComposite( Advv, "~ndx100AdvV", "x",1);
AddToComposite( DecV, "~ndx100DecV", "x",1);
AddToComposite( AdvI, "~NDX100AdvI", "x");
AddToComposite( DecI, "~NDX100DecI", "x");
Buy=0;
Then in Indicator builder place this formula:
 

//XXX = (AdvIssues() / DecIssues()) / (AdvVolume() / DecVolume());
xxx=(Foreign("~ndx100advi","x")/Foreign("~ndx100deci","x"))/(Foreign("~ndx100advv","x")/Foreign("~ndx100decv","x"));
//Plot(xxx,"TRin",colorRed,styleLine);
Plot(MA(xxx,5),"MA5",colorBlue,styleLine);
Plot(MA(xxx,10),"MA10",colorYellow,styleLine);
Plot(MA(xxx,15),"MA15",colorWhite,styleLine);
Title="Trin_A" +"..."+"MA5 ="+WriteVal(MA(xxx,5),1.2)+"...MA10 ="+WriteVal(MA(xxx,10),1.2)+"...MA15 ="+WriteVal(MA(xxx,15),1.2); Anthony
-------Original Message-------
 

From: amibroker@xxxxxxxxxxxxxxx
Date: Tuesday, March 18, 2003 11:33:14 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Re: Help
 Thanks for the help Anthony but the moving avg still does not want to work.In the first instance using plot it plots the XXX but the ma's sayempty. The second case using graph there is only the XXX graph and no signsof any others.Ernie--- In amibroker@xxxxxxxxxxxxxxx, "Anthony Faragasso" <ajf1111@xxxx> wrote:> Ernie,> > Graph() function  is still available for backward compatability ( I believe> ) ...The plot () function is the newer version of showing charts.....> > It is your choice as to what to use to show graphs..> > XXX = (AdvIssues() / DecIssues()) / (AdvVolume() / DecVolume());> Plot(XXX,"Trin_A",colorRed,styleline);> plot(ma(xxx,5),"MA5", colorblue,styleline);> plot(ma(xxx,10),"MA10",coloryellow,styleline);> Plot(ma(xxx,15),"MA15",colorwhite,styleline);> > OR this:> > Maxgraph=5;//number should be 1 more than graph statements> > XXX = (AdvIssues() / DecIssues()) / (AdvVolume() / DecVolume());> > graph0=xxx;> graph1=ma(xxx,5);> graph2=ma(xxx,10);> graph3=ma(xxx,15);> > graph0style=graph1style=graph2style=graph3style=styleline;> > graph0color=colorred;> graph1color=colorblue;> graph2color=colorwhite;> graph3color=coloryellow;> > Title=Name();> > So....I quess you can decide which you would like to use...Plot() or Graph()> > > Anthony>  > -------Original Message------->  > From: amibroker@xxxxxxxxxxxxxxx> Date: Tuesday, March 18, 2003 10:53:47 PM> To: amibroker@xxxxxxxxxxxxxxx> Subject: [amibroker] Help>  > Hi,> I am trying to Plot a moving average of the trin index.> I would like to create this indicator to use on an index such> as the S+P 500. > I have been trying it like this> > XXX = (AdvIssues() / DecIssues()) / (AdvVolume() / DecVolume());> Plot(XXX,"Trin_A",colorRed);> > This will plot the trin just fine but I now want a 5-day moving avg> of this.> > Graph0= MA( XXX, 5 );> Graph1= MA( XXX, 10 );> > This does not work.> What is the difference between a plot and a graph? Which do I use and> how can I plot a 5-day, 10-day or even a 55-day moving avg of the > XXX above on the same plot and then make a Buy Sell scan using cross> overs of this data.> Thanks a Lot!!> Ernie> > > Yahoo! Groups Sponsor> ADVERTISEMENT> > > > > Send BUG REPORTS to bugs@xxxx> Send SUGGESTIONS to suggest@xxxx> -----------------------------------------> Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx > (Web page: http://groups.yahoo.com/group/amiquote/messages/)> --------------------------------------------> Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq> html > > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.Send BUG REPORTS to bugs@xxxxxxxxxxxxxSend SUGGESTIONS to suggest@xxxxxxxxxxxxx-----------------------------------------Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 
 







____________________________________________________  IncrediMail - Email has finally evolved - Click Here






Yahoo! Groups Sponsor


  ADVERTISEMENT









Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html



Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

Attachment: Description: ""