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

[amibroker] Re: High & Low for the first 30 & 60mts for Each Day



PureBytes Links

Trading Reference Links


Thanks a million to Geo Singleman. Your program does exactly what I 
require. 


G.A.Chandrasekaran



--- In amibroker@xxxxxxxxxxxxxxx, "Geo Singleman" <geosing@xxxx> 
wrote:
> Here is working code that plots the opening range. It does the High 
& Low
> establishing from Open (whatever your market open is) till the Time
> specified (10:30) in the code below. It does the line only in 5 
minute time
> frame. You can add additional plots for other opening range 
periods. Colors
> assume black background - so you may need to change them to suit 
your setup.
> It also plots daily pivot range - commented out.
> 
> 
> Geo
> 
> 
> // Opening Range Plot
> // ORPlot.afl
> // v 1.1 9/3/2004
> // plots OR levels intraday only in 5 minute timeframe and pivot 
range from
> daily
> 
> GraphXSpace = 1;
> Per = Param("Periods",13);
> Per2 = Param("Periods 2",34);
> LSMAPer = Param("LMSA Period",25);
> Offset = Param("A Level",1);
> ACDFlag = 0;
> IntervalFlag = IIf(Interval(format=0)==300,1,0);
> 
> strInterval = Interval(format=2);
> 
> strWeekday = StrMid("SunMonTueWedThuFriSat", SelectedValue(DayOfWeek
())*3,
> 3);
> ACDTime = 103000;
> 
> Shift = 2;
> MaxGraph = 7;
> 
> // calculate the pivot range
> PDH = TimeFrameGetPrice( "H", inDaily, -1 ); // gives previous Day 
High when
> working on intraday data
> PDL = TimeFrameGetPrice( "L", inDaily, -1 );
> PDC = TimeFrameGetPrice( "C", inDaily, -1 );
> PP = (PDH+PDL+PDC)/3;
> 
> DIFF = abs((PDH+PDL)/2 - PP);
> PRHi = PP + DIFF;
> PRLo = PP - DIFF;
> 
> Plot(C,"Close",colorWhite,styleCandle);
> 
> if (IntervalFlag) {
> 
> ORHigh=
> ValueWhen(TimeNum()<ACDTime,HighestSince(DateNum()>Ref(DateNum(),-
1),High));
> ORLow =
> ValueWhen(TimeNum()<ACDTime,LowestSince(DateNum()>Ref(DateNum(),-
1),Low));
> 
> // Plot
(PRHi,"PRHigh",colorWhite,styleDots+styleNoLine+styleNoLabel);
> // Plot(PRLo,"PRLow",colorWhite,styleDots+styleNoLine+styleNoLabel);
> Plot
(ORHigh,"ORHigh",colorBlue,style=styleStaircase+styleDots+styleNoLine)
;
> Plot
(ORLow,"ORLow",colorBlue,style=styleStaircase+styleDots+styleNoLine);
> 
> }
> 
> Title=Name()+" ["+strInterval+"] "+ strWeekday + " " +Date()+ " 
Close:
> "+WriteVal(C,format=1.2) +" "+ " PR High: "+WriteVal
(PRHi,format=1.2) + " PR
> Low: "+WriteVal(PRLo,format=1.2)  ;
> 
> 
> ----- Original Message ----- 
> From: "gacsekar" <gacsekar@xxxx>
> To: <amibroker@xxxxxxxxxxxxxxx>
> Sent: Friday, October 08, 2004 02:33 AM
> Subject: [amibroker] Re: High & Low for the first 30 & 60mts for 
Each Day
> 
> 
> >
> >
> > Thanks for the indicator from kaveman perth, Msg #71552,
> > <<
> > High30 = ValueWhen( Cross( TimeNum(), 102959 ), H );
> > Plot(C,"close",colorBlack,styleBar);
> > Plot( IIf( DateNum()==LastValue(DateNum()) AND TimeNum()>102959,
> > High30, Null ), "30high", colorRed, styleLine );
> > >>
> >
> > Unfortunately it plots a horizontal line on the 30th minute @ 
10:30am
> > for the day.  I am looking for the Hi & Lo for the entire first 
30mts
> > for each day. (not the Hi value of the 30th minute).  Hope some 
one
> > can help me!!   Thanks.
> > G.A.Chandrasekaran
> >
> >
> > --- In amibroker@xxxxxxxxxxxxxxx, kaveman perth 
<kavemanperth@xxxx>
> > wrote:
> > > Sorry made a small mistake in the variable name, i also changed 
a
> > bit
> > > to make it work better
> > >
> > > High30 = ValueWhen( Cross( TimeNum(), 102959 ), H );
> > > Plot(C,"close",colorBlack,styleBar);
> > > Plot( IIf( DateNum()==LastValue(DateNum()) AND TimeNum()>102959,
> > > High30, Null ), "30high", colorRed, styleLine );
> > >
> > >
> > > On Thu, 07 Oct 2004 12:57:22 -0000, gacsekar <gacsekar@xxxx> 
wrote:
> > > >
> > > >
> > > > Hi,
> > > > Thanks for the prompt response.  When I run the indicator I 
get
> > the
> > > > following error message.
> > > >
> > > > <<. Line 1, Column 6:
> > > > 30High
> > > > ----^
> > > > Error 23.
> > > > Syntax error >>
> > > >
> > > > I will be thankful if you could write the complete code for 
both
> > Hi &
> > > > Lo for the first 30mts.  I am using Amibroker 4.6.
> > > >
> > > > Thanks
> > > >
> > > > G.A.Chanrasekaran
> > > >
> > > > --- In amibroker@xxxxxxxxxxxxxxx, kaveman perth
> > <kavemanperth@xxxx>
> > > > wrote:
> > > > > You can use valuewhen and cross to get your values. Here is 
an
> > > > example
> > > > > for plotting the current days value
> > > > >
> > > > > 30high = valuewhen( cross( timenum(), 102959 ), H );
> > > > > plot( iff( datenum()==now(3) and timenum()>102959, 30high,
> > null ),
> > > > > "30high", colorred, styleline );
> > > > >
> > > > > On Thu, 07 Oct 2004 11:04:37 -0000, gacsekar <gacsekar@xxxx>
> > wrote:
> > > > > >
> > > > > >
> > > > > > Hi to all,
> > > > > >
> > > > > > I am day-trading Indian markets with 5mts chart, using
> > Amibroker
> > > > 4.6
> > > > > > The trading opens @9:55 am & closes @3:30pm.
> > > > > >
> > > > > > I want to draw a horizontal line for the High & Low for 
the
> > first
> > > > 30
> > > > > > & 60mts, for each day, (The ending period could be @ 
10:25 to
> > > > > > 1030am / 10:55 to 11:00am).  I hope my requirement is 
clear.
> > > > > > Thanks in advance.
> > > > > >
> > > > > > G.A.Chandrasekaran
> > > > > >
> > > > > >
> > > > > > Check AmiBroker web page at:
> > > > > > http://www.amibroker.com/
> > > > > >
> > > > > > Check group FAQ at:
> > > > http://groups.yahoo.com/group/amibroker/files/groupfaq.html
> > > > > > Yahoo! Groups Links
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Cheers
> > > > > Graham
> > > > > http://e-wire.net.au/~eb_kavan/
> > > >
> > > >
> > > >
> > > > Check AmiBroker web page at:
> > > > http://www.amibroker.com/
> > > >
> > > > Check group FAQ at:
> > http://groups.yahoo.com/group/amibroker/files/groupfaq.html
> > > > Yahoo! Groups Links
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> > > -- 
> > > Cheers
> > > Graham
> > > http://e-wire.net.au/~eb_kavan/
> >
> >
> >
> >
> >
> >
> > Check AmiBroker web page at:
> > http://www.amibroker.com/
> >
> > Check group FAQ at:
> http://groups.yahoo.com/group/amibroker/files/groupfaq.html
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
> >





------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Yahoo! Groups Links

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

<*> 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/