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

Re: [amibroker] Re: trying to calculate pivot points using a limmited time frame



PureBytes Links

Trading Reference Links

Graham,

Today I tested my scanner but nothing show up.  My settings were periodicity 1min and N last quotations.

I added this code:

StartTime = 094500 ;
DayStart = Cross (Timenum(), 093000) ;

Buy = DayStart > StartTime AND ( Cross ( H,OR30High) ;

Any help is appreciated

thanks

tony

On 10/6/05, Tony Lei <yiupang91@xxxxxxxxx> wrote:
Thank you
 
This is what I needed.

 
On 10/6/05, Graham <kavemanperth@xxxxxxxxx > wrote:
Daystart would I think be an Array, ie has different values for
different bars, therefor you would need to use a For lloop and array
identifier.

StartTime = 094500 ;

for(i=1;i<barcount;i++)
{
IF (dayStart[i] > StartTime)
{
buy[i] =  H[i]> OR30high[i] and h[i-1]<=or30high[i-1];
}
}

note also that you require the semi-colon at the end of the Buy line

An easier alternative if this is all you have to define the Buy signal would be

StartTime = 094500 ;
buy = dayStart > StartTime and Cross ( H, OR30high );



--
Cheers
Graham
AB-Write >< Professional AFL Writing Service
Yes, I write AFL code to your requirements
http://e-wire.net.au/~eb_kavan/ab_write.htm

On 10/6/05, Tony Lei <yiupang91@xxxxxxxxx> wrote:
> Graham,
>
> I 'm trying to use an IF statement for the following intraday scan, but it does not work.  It ask for a numeric variable and I don't know what to use besides IF statements.  From the code example you provided, this is what I came up.  I'm trying to make the scan run only after StartTime and only the current day.
>
> StartTime = 094500 ;
> IF (dayStart > StartTime)
> {
> buy = Cross ( H, OR30high )
> }
>
> thanks for the help
>
> tony
>
>
> On 10/5/05, Dennis And Lisa < dennisandlisa@xxxxxxxxxxxxx> wrote:
> > Thank you Graham...this is exactly what I was looiing for.
> >
> > Dennis
> >
> >
> > --- In amibroker@xxxxxxxxxxxxxxx , Graham <kavemanperth@xxxx> wrote:
> > > Here are a couple of things you can try
> > >
> > > you can code in the intraday times with AFL
> > > dayStart = cross(timenum(),062959);
> > > dayFinish = cross(timenum(),125959);
> > > eg these can be used to find the days open and close prices with
> > valuewhen
> > > Dayopen = valuewhen( daystart, O );
> > > DayClose = valuewhen( dayfinish, C );
> > >
> > >
> > > or use this condition
> > > MarketOpen = timenum()>=63000 and timenum()<=130000;
> > >
> > > If you are using a chart you can set the market times into either day
> > > or night session and use that for the chart, or as above use the aFL
> > >
> > >
> > > --
> > > Cheers
> > > Graham
> > > AB-Write >< Professional AFL Writing Service
> > > Yes, I write AFL code to your requirements
> > > http://e-wire.net.au/~eb_kavan/ab_write.htm
> > >
> > >
> >
> > > On 10/5/05, Dennis And Lisa <dennisandlisa@xxxx> wrote:
> > > > I'm trying to calculate pivot points and I need info from the previous
> > > > day session for the YM futures contract. I know that futures trade 24
> > > > hrs, thus AFL assumes that the previous day's trading session is 24
> > > > hrs. I need to code into AFL that the previous day's trading session
> > > > is from 6:30 AM to 1:00 PM pacific time only for the YM.  Is there a
> > > > way I can do this with the "TimeframeSet in Daily" or similar function
> > > > to specify a limited session range?
> > > >
> > > > Thank you
> > > > Dennis
> >
> >


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 other support material please check also:
http://www.amibroker.com/support.html





YAHOO! GROUPS LINKS







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 other support material please check also:
http://www.amibroker.com/support.html





YAHOO! GROUPS LINKS