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

[amibroker] Re: plotting tomorrow pivots



PureBytes Links

Trading Reference Links

The Pivot point and R1, S1, r2, S2 r3,s3 can easily be ploted on the 
intraday chart by the method below,I have just written it few min 
back. Just check it out::
===================================================================

/* This system is based on PIVOT calculation based on previous day 
H,L,C value and ploted on the intraday chart when pointer is focused 
on todays data 
The programme is developed by Debdulal Bhattacharyya(Except 
Calculation part) */

SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %
g, Lo %g, Close %g (%.1f%%) Vol " +WriteVal( V, 1.0 ) +" 
{{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 )) ));
Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle | 
ParamStyle("Style") | GetPriceStyle() ); 

H1=SelectedValue( TimeFrameGetPrice( "H", inDaily, -1 ));
L1=SelectedValue(TimeFrameGetPrice( "L", inDaily, -1 ));
C1=SelectedValue(TimeFrameGetPrice( "C", inDaily, -1 ));

/*PIVOT Calculation*/
p = ( H1+ L1 + C1 )/3;
s1 = (2*p)-H1;
r1 = (2*p)-L1;
s2 = p -(H1 - L1);
s3 = S1 - (H1-L1); 
r2 = p +(H1 - L1);
r3 = R1 +(H1-L1);

Plot (p,"Pivot",25,1);
Plot (r1,"R1",12,1);
Plot (r2,"R2",12,1);
Plot (r3,"R3",12,1);
Plot (s1,"S1",3,1);
Plot (s2,"S2",3,1);
Plot (s3,"S3",3,1);

/* Exploration Zone  */
b=Cross(C,p)OR Cross(C,r1);
s=Cross(p,C) OR Cross(s1,C);
Filter=b OR s;
AddColumn(IIf(b,C,Null),"Buy",1.2,colorGreen);
AddColumn(IIf(s,C,Null),"Selll",1.2,colorRed);







--- In amibroker@xxxxxxxxxxxxxxx, "Howard B" <howardbandy@xxx> wrote:
>
> Hi L V --
> 
> Richard Boroff was the conference organizer.   During the 
conference the
> presentations are recorded, and Richard puts them on DVDs for sale 
to people
> who were not able to attend in person.  Here is the link to his 
web page
> about the conference.  Check it for news about the DVDs.  And he 
will
> probably make an announcement on this Yahoo forum.
> 
> http://www.ftmonitor.com/lv08/lv08intro.html
> 
> Thanks,
> Howard
> 
> 
> On Tue, Feb 26, 2008 at 8:46 PM, L. V. Gandhi <lvgandhi@xxx> wrote:
> 
> >   Any site where we can see the proceedings?
> >
> >
> > On Tue, Feb 26, 2008 at 3:35 PM, Howard B 
<howardbandy@xxx<howardbandy%40gmail.com>>
> > wrote:
> > >
> > >
> > >
> > >
> > >
> > >
> > > Hi Steve --
> > >
> > > I thought it was good. It was a two-day workshop focusing on 
trading
> > > systems design, testing, and validation, followed by a day-and-
a-half
> > > conference that combined topics from both FastTrack and 
AmiBroker, along
> > > with a lot on exchange traded funds. The side discussions over 
breaks
> > and
> > > meals were also excellent -- there were a lot of very 
experienced
> > > practitioners who were very willing to share their experiences 
and
> > ideas.
> > >
> > > Thanks,
> > > Howard
> > >
> > > On Mon, Feb 25, 2008 at 11:19 AM, Steve Dugas 
<sjdugas@xxx<sjdugas%40comcast.net>>
> > wrote:
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > Hi Howard - you are on a roll today.. 8 - )
> > > > How was the conference?
> > > >
> > > > Steve
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > ----- Original Message -----
> > > > From: Howard B
> > > > To: amibroker@xxxxxxxxxxxxxxx <amibroker%40yahoogroups.com>
> > > > Sent: Monday, February 25, 2008 11:40 AM
> > > > Subject: Re: [amibroker] plotting tomorrow pivots
> > > >
> > > > Hi Tony --
> > > >
> > > > This is probably not the answer to all the questions you 
asked, but
> > here
> > > is afl code to plot the pivot points for tomorrow one day 
ahead.
> > > >
> > > > ----------------------------
> > > >
> > > > // PivotPoints.afl
> > > > //
> > > > // Traditional pivot points.
> > > > // Thought by some to indicate levels of support
> > > > // and resistance.
> > > > //R2 = P + (H - L) = P + (R1 - S1)
> > > > //R1 = (P x 2) - L
> > > > //P = (H + L + C) / 3
> > > > //S1 = (P x 2) - H
> > > > //S2 = P - (H - L) = P - (R1 - S1)
> > > > P = (H + L + C) / 3;
> > > > R1 = (P * 2) - L;
> > > > S1 = (P * 2) - H;
> > > > R2 = P + (R1 - S1); // P + (H - L)
> > > > S2 = P - (R1 - S1); // P - (H - L)
> > > > Plot(C,"C",colorBlack,styleCandle);
> > > > // Displace the plot of the pivot points one bar
> > > > // to the right.
> > > > // Pivot points are based on the current bar,
> > > > // but are thought to provide indication of
> > > > // support and resistance for the next bar.
> > > > //
> > > > Displace=1;
> > > > Plot(R2,"R2",colorRed,styleLine,0,0,Displace);
> > > > Plot(R1,"R1",colorPink,styleLine,0,0,Displace);
> > > > Plot(P,"P",colorBlue,styleLine,0,0,Displace);
> > > > Plot(S1,"S1",colorPaleGreen,styleLine,0,0,Displace);
> > > > Plot(S2,"S2",colorGreen,styleLine,0,0,Displace);
> > > > //Figure 8.5 Pivot Points
> > > >
> > > > ------------------------------
> > > >
> > > > Thanks,
> > > > Howard
> > > > www.quantitativetradingsystems.com
> > > >
> > > >
> > > > On Thu, Feb 21, 2008 at 3:24 PM, Tony <talcamo@xxx<talcamo%
40gmail.com>>
> > wrote:
> > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > Hi,
> > > > > I am hoping to have someone point me in the correct 
direction.
> > > > > Below is my intraday code to compute tomorrows pivot 
points and
> > > > > S1,S2,S3
> > > > > R1,R2,R3
> > > > > In the title line of my intraday chart is displayed daily
> > cummulative
> > > > > quotes for close open volume etc and tomorrows pivots.
> > > > > see code below
> > > > >
> > > > > even though my price graph is in 5 minute timeframe 
increments i
> > > > > switch to a daily time frame to compute yesterdays close, 
high and
> > > > > low and am able to compute the pivots for the following day
> > correctly.
> > > > >
> > > > > i have 2 questions which i hope someone can answer:
> > > > > 1) i need to click twice on a bar to get the values to 
display on
> > > > > the title for price chart (the first click shows most of 
the fields
> > > > > as empty values). why? may i get around this?
> > > > > 2) i tried using the plot command(see last line of code). 
i expected
> > > > > a single straight line plotted on my intraday chart ( a 
different
> > one
> > > > > for each day). But i think i cannot plot it correctly 
since each of
> > > > > the arrays is in daily timeframe rather than 5 minute
> > timeframe(which
> > > > > is the display timeframe for the chart.) would populating 
an array
> > > > > with the same value for all the intraday timeframe fix the 
problem?
> > > > > which command do i use to do this? or is there a better way
> > > > >
> > > > > Thank you in advance for your help and consideration
> > > > > Tony
> > > > >
> > > > > // compute pivot points for next day when using intraday 
charts
> > > > > TimeFrameSet( inDaily ); // switch to daily frame
> > > > > OpenDailyYest = Ref(Open ,-1);
> > > > > CloseDailyYest = Ref(Close,-1);
> > > > > HighDailyYest = Ref(High ,-1);
> > > > > LowDailyYest = Ref(Low ,-1);
> > > > >
> > > > > OpenDaily = Open ;
> > > > > CloseDaily = Close ;
> > > > > HighDaily = High ;
> > > > > LowDaily = Low ;
> > > > > VolumeDaily= Volume;
> > > > > TimeFrameRestore() ; // restore time frame to original
> > > > >
> > > > > PP = (HighDailyYest + LowDailyYest + CloseDailyYest) / 3;
> > > > > R1 = (2 * PP) - LowDailyYest ;
> > > > > S1 = (2 * PP) - HighDailyYest ;
> > > > > R2 = PP + (R1 - S1);
> > > > > S2 = PP - (R1 - S1);
> > > > > R3 = HighDailyYest + 2*(PP - LowDailyYest );
> > > > > S3 = LowDailyYest - 2*(HighDailyYest - PP);
> > > > >
> > > > > Title = Name() + " " + Date() + " Close="+ WriteVal
> > > > > (CloseDaily ,5.2)+ "
> > > > > Days Open = "+ WriteVal (OpenDaily ,5.2)+ "
> > > > > Days Gain/Loss= "+ WriteVal ((closeDaily-ref(closeDaily,-
1)),2.3)+ "
> > > > > Days High = "+ WriteVal (HighDaily,5.2)+ "
> > > > > Days Low = "+ WriteVal (LowDaily,5.2)+ "
> > > > > Days Volume = "+ WriteVal (volumeDaily,10.0)+"
> > > > > Days Range = "+ WriteVal (highDaily-lowDaily,8.2)+"
> > > > > //DaysDelta= "+ WriteVal (close-open,8.2)+"
> > > > > TomorrowPP= "+ WriteVal (PP,8.2)+"
> > > > > TomorrowS1= "+ WriteVal (S1,8.2)+"
> > > > > TomorrowS2= "+ WriteVal (S2,8.2)+"
> > > > > TomorrowS3= "+ WriteVal (S3,8.2)+"
> > > > > TomorrowR1= "+ WriteVal (R1,8.2)+"
> > > > > TomorrowR2= "+ WriteVal (R2,8.2)+"
> > > > > TomorrowR3= "+ WriteVal (R3,8.2) ;
> > > > > Plot (PP,"PP",colorRed);
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> > --
> > L.V.Gandhi
> > http://lvgandhi.tripod.com/
> > linux user No.205042
> >  
> >
>




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/