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

[amibroker] Accessing last nights close using the Foreign function



PureBytes Links

Trading Reference Links

While using a 1 min data set I am trying to pull last nights close on 
a daily time frame for use in an intraday calculation. The code below 
just keeps pulling the last minute's close instead of last nights. The 
main symbol is fine, it just screws up the Foreign function symbol.

Could anyone point me in the right direction?
Thank you!

QQQQ = Foreign("QQQQ" , "C" , 1); /*Close On a One Min bar*/
_TRACE("QQQQ : " + QQQQ );
_SECTION_BEGIN("Yesterday's Foreign close");
TimeFrameSet(inDaily); //switch to daily time frame. 
YQQQQ = Foreign("QQQQ" , "C" , 1);//YestQQQQClose = YQQQQ ;
TimeFrameRestore(); 
_SECTION_END();

QQQQRefPoint =  TimeFrameExpand(YQQQQ , inDaily) ; /* Referencing 
yesterdays daily close for use in todays intraday chart.*/ 



Content-Description: "AVG certification"
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.409 / Virus Database: 268.13.27/517 - Release Date: 11/3/2006