hi,

I coded it below. Code uses plugin deDateTime.dll which can be found here: 
http://www.amibroker.org/3rdparty/

The high and low price you want are in DH and DL.


SetBarsRequired(10000,10000); 

starttime = 160000; 
endtime = 170000; 

tn = TimeNum(); 

timecond = tn >= starttime AND tn <= endtime; 
startday = tn == starttime; 

firstBarOfDay = deFlagFirstBarOfDay( starttime ); 
lastBarOfDay = deFlagLastBarOfDay( endtime); 

myHigh = ValueWhen(timecond, HighestSince(firstBarOfDay,High)); 
myLow = ValueWhen(timecond, LowestSince(firstBarOfDay,Low)); 

DH = TimeFrameCompress(myHigh, inDaily, compressLast); 
DL = TimeFrameCompress(myLow, inDaily, compressLast); 

DH = TimeFrameExpand(Ref(DH,-1),inDaily,expandFirst); 
DL = TimeFrameExpand(Ref(DL,-1),inDaily,expandFirst); 

SetChartOptions(0, chartShowDates); 
Plot(C,"Last=",colorWhite,64); 
Plot(DH,"DH",colorBrightGreen,styleDashed | styleThick); 
Plot(DL,"DL",colorRed,styleDashed | styleThick); 

Plot( timecond, "", colorDarkGrey, styleArea|styleOwnScale,0,1); 






  ----- Original Message ----- 
  From: Martin Simek 
  To: [email protected] 
  Sent: Monday, March 16, 2009 11:05 PM
  Subject: [amibroker] yesterday prices


  Hallo,
  I would like to have yesterday High and Low based on 
  Trading Hours 05:00 PM - 04:00 PM (Futures for JPY at GLOBEX)
  I tried to use
  yHigh = TimeFrameGetPrice( "H", inDaily, -1 );
  yLow = TimeFrameGetPrice( "L", inDaily, -1 );
  Bud it work on 24 hour base, starting exactly at 0:00 and ending at 23:59.

  How to get yesterday H/L for time daily timeframe between 05:00 PM - 04:00 PM?

  Martin


  

Reply via email to