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

Re: [amibroker] yesterday prices



PureBytes Links

Trading Reference Links

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



__._,_.___


**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/





Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___