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

[amibroker] Re: How To Get HHV( High, between 09:30 and 10:30 )



PureBytes Links

Trading Reference Links

Lester, this is what you want and you can use it on any timeframe 
below the hourly too:

TimeFrameSet(inHourly);
High60 = ValueWhen(DateNum() != Ref(DateNum(), -1), H);
Low60 = ValueWhen(DateNum() != Ref(DateNum(), -1), L);
Close60 = ValueWhen(DateNum() != Ref(DateNum(), -1), C);
TimeFrameRestore();

High60x = TimeFrameExpand(High60, inHourly);
Low60x = TimeFrameExpand(Low60, inHourly);
Close60x = TimeFrameExpand(Close60, inHourly);

Plot(IIf(TimeNum() >= 103000 AND TimeNum() <= 160500, High60x, 
Null), "", colorBlue, styleLine | styleThick);
Plot(IIf(TimeNum() >= 103000 AND TimeNum() <= 160500, Low60x, 
Null), "", colorRed, styleLine | styleThick);
Plot(IIf(TimeNum() >= 103000 AND TimeNum() <= 160500, Close60x, 
Null), "", colorYellow, styleLine | styleThick);

Plot(Close, "", colorBlack, styleCandle);

SetChartOptions(0, chartShowDates);


--- In amibroker@xxxxxxxxxxxxxxx, "Lester Vanhoff" <ebsn247lsm@xxx> 
wrote:
>
> I need the following code for intraday data (one-minute database):
> 
> 1) HHV( High, between 09:30 and 10:30 );
> 
> 2) Close (at 10:30);
> 
> Then I would need to plot those as horizontal lines each day from 
their start time till the end of the day.
> 
> Tnx
>



Content-Description: "AVG certification"
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.441 / Virus Database: 268.17.35/680 - Release Date: 2/10/2007 9:15 PM