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

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



PureBytes Links

Trading Reference Links

That's great - exactly what I was looking for - thanks for the help!

--- In amibroker@xxxxxxxxxxxxxxx, Lal <klal25@xxx> wrote:
>
> 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@xxx>
> 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
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/