PureBytes Links
Trading Reference Links
|
That certainly works if I'm running an exploration where the range is just today, but it doesn't solve the problem from a backtesting perspective as it plugs todays last value number into all of the past days.
Are there any other solutions?
Graham <gkavanagh@xxxxxxxxxxxxx> wrote:
The VLB needs to be a value, not an array. So use LastvalueCORR = Correlation(ROC(FUND,1),ROC(INDEX,1),LastValue(VLB));Cheers,Grahamhttp://groups.msn.com/ASXShareTradinghttp://groups.msn.com/FMSAustralia-----Original Message-----From: Gary Serkhoshian [mailto:serkhoshian777@xxxxxxxxx] Sent: Friday, 29 August 2003 7:37 AMTo: amibroker@xxxxxxxxxxxxxxxSubject: [amibroker] Need code helpI'm reposting because I think I confused everyone with my terminology.How can I get the following code to work. The correlation function at the bottom of the code is giving a syntax error when I use a variable in the length.SIG = Foreign("~SIGNAL","C");FUND = C;INDEX =
Foreign("$RUT","C");BARSTART = ValueWhen(SIG == 1 AND Ref(SIG != 1,-1),BarIndex(),3); VLBRAW =BarIndex() - BARSTART;/* FIND THE CLOSEST LOOKBACK PERIOD TO VBL1 LENGTH. WE WILL USE INCREMENTS OF 126 (1/2 OF 252 DAY YEAR) TO DO THIS.VLBRAW = GET RAW VLB NUMBER AS VECTORVLB = USING IIF, FIND CLOSEST FIT.*/VLBRAWFACTOR = Max(round(VLBRAW / 126),1); //WHICH MULTIPLE OF 126 IS BEST FIT?VLB = IIf(VLBRAWFACTOR == 1, 126, IIf(VLBRAWFACTOR == 2, 252, IIf(VLBRAWFACTOR == 3, 378, IIf(VLBRAWFACTOR == 4, 504, IIf (VLBRAWFACTOR == 5,630, 756))))); //CORR CHECKSCORR = Correlation(ROC(FUND,1),ROC(INDEX,1),VLB);------------------------ Yahoo! Groups Sponsor ---------------------~--> BuyInk Cartridges or Refill Kits for Your HP, Epson, Canon or Lexmark Printerat Myinks.com. Free s/h on orders $50 or more to the US & Canada.<A
href="">http://www.c1tracking.com/l.asp?cid=5511http://us.click.yahoo.com/l.m7sD/LIdGAA/qnsNAA/GHeqlB/TM---------------------------------------------------------------------~->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 http://docs.yahoo.com/info/terms/
Yahoo! Groups Sponsor
ADVERTISEMENT
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.
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
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.
|