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

Re: [amibroker] Previous day's open/close/high/low in intraday mode



PureBytes Links

Trading Reference Links

See if you find the code snippet below useful...
Cheers,
Lal
------------------------------------------------------------------------------
Show_Prev = ParamToggle("Display Prev HLC", "No|Yes", 1);

// Get Previous Day's close, Low and High
Prev_Close = TimeFrameGetPrice( "C", inDaily, -1, expandFirst) ;
Prev_Low = TimeFrameGetPrice( "L", inDaily, -1, expandFirst) ;
Prev_High = TimeFrameGetPrice( "H", inDaily, -1, expandFirst) ;
Today = LastValue(Day() );
if(Show_Prev)
{
Plot(IIf(Today == Day(), Prev_Close, Null), "Prev Close", ParamColor("Prev. Close", colorWhite), styleLine|styleThick|styleNoRescale);
Plot(IIf(Today == Day(), Prev_Low, Null), "Prev Low", ParamColor("Prev Low", colorOrange), styleLine|styleThick|styleNoRescale);
Plot(IIf(Today == Day(), Prev_High, Null), "Prev High", ParamColor("Prev High", colorAqua), styleLine|styleThick|styleNoRescale);
}
------------------------------------------------------------------------------
NB: The bit that goes "Today == Day()" has a double "equal to" sign


----- Original Message ----
From: droskill <droskill@xxxxxxxxx>
To: amibroker@xxxxxxxxxxxxxxx
Sent: Thursday, 14 August, 2008 4:29:48 PM
Subject: [amibroker] Previous day's open/close/high/low in intraday mode

If I'm in intraday mode (1-minute bars), is there an easy way to
determine the open/close/high/ low of the PRIOR day? I'm using IB as
my data source and I want to draw classic pivot points, but I can't
figure out how to get the data I need. I've looked at all the pivot
point AFL code that exists and none will do what I want (which is a
duplication of what Quotetracker does with the Pivot indicator).

Any help greatly appreciated!


Send instant messages to your online friends http://uk.messenger.yahoo.com __._,_.___

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html




Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___