PureBytes Links
Trading Reference Links
|
Oops, sorry, I should have cut and pasted - I had used LinearReg.
--- In amibroker@xxxxxxxxxxxxxxx, Anthony Faragasso <ajf1111@xxxx>
wrote:
> Counter =10;
>
>
> x= LinReg(close,Counter);
>
> should read:
>
> x=linearReg(close,counter);
>
>
>
>
>
> "idw9 " wrote:
>
> >
> >
> > Hi
> >
> >
> >
> >
> > I have a section of Tradestation code I would like to convert to
AB as
> >
> > follows:
> >
> >
> >
> >
> > For Counter = 52 downto 13 Begin
> >
> >
> > if linearRegValue(close,Counter,0) >
linearRegValue(close,Period,0)
> > then Period = Counter;
> >
> >
> > End ;
> >
> >
> > Cord = linearRegValue(close,Period,0);
> >
> >
> >
> >
> > Could anyone suggest how this can be done?
> >
> >
> >
> >
> > More specifically
> >
> >
> >
> >
> > 1. What is the AB equivalent of LinearRegValue()
> >
> >
> >
> >
> > 2. How can an AB function be used within a VBScript For ... Next
> > loop?
> >
> >
> >
> >
> > 3 I can write
> >
> >
> >
> >
> > x= LinReg(close,10);
> >
> >
> >
> >
> > it will execute OK, but if I write
> >
> >
> >
> >
> > Counter =10;
> >
> >
> > x= LinReg(close,Counter);
> >
> >
> >
> >
> > I get the following error
> >
> >
> >
> >
> > Bad args
> >
> >
> > at line 3, column 20
> >
> >
> > x= LinReg(close,Counter);
> >
> >
> > -----------------------^
> >
> >
> >
> >
> > Any help would be appreciated
> >
> >
> >
> >
> > Ian
> >
> >
> >
> > 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@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 http://docs.yahoo.com/info/terms/
|