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

Re: [amibroker] Quotetracker Pivot Points



PureBytes Links

Trading Reference Links

Hi Droskill,
Just one more bit - if you want to show the Previous Day High, Low and Close for ALL days, 
use this line:
Today = Day();
instead of  "Today = Lastvalue(Day());"
Better still, you can make this work under a ParamToggle to allow plotting either for current day only or all days.
Cheers,
Lal

----- Original Message ----
From: droskill <droskill@xxxxxxxxx>
To: amibroker@xxxxxxxxxxxxxxx
Sent: Thursday, 14 August, 2008 6:21:54 PM
Subject: [amibroker] Quotetracker Pivot Points

In the interest of others that might find it useful - here's the code
for Quotetracker Pivot Points - I'm also working on a version for
Camarilla Pivot Points.

One question for the group - I'd love to display a little "R1" next to
each line on the left side of the screen - any easy way to do that?

Thanks - and thanks LaL for helping me with this.
------------ --------- --------- --------- ------

Show_Prev = ParamToggle( "Display Pivots", "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( ) );
P = (Prev_High + Prev_Low + Prev_Close)/ 3;
R1 = (P*2)-Prev_Low;
S1 = (P*2)-Prev_High;
R2 = P + (R1 - S1);
S2 = P - (R1 - S1);

if(Show_Prev)
{
Plot(IIf(Today == Day(), P, Null), "P", ParamColor(" P", colorRed),
styleLine|styleThic k|styleNoRescale );
Plot(IIf(Today == Day(), R1, Null), "R1", ParamColor(" R1", colorRed),
styleLine|styleThic k|styleNoRescale );
Plot(IIf(Today == Day(), R2, Null), "R2", ParamColor(" R2", colorRed),
styleLine|styleThic k|styleNoRescale );
Plot(IIf(Today == Day(), S1, Null), "S1", ParamColor(" S1", colorRed),
styleLine|styleThic k|styleNoRescale );
Plot(IIf(Today == Day(), S2, Null), "S2", ParamColor(" S2", colorRed),
styleLine|styleThic k|styleNoRescale );
}


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

__,_._,___