PureBytes Links
Trading Reference Links
|
hi
i think this is the fastest way x =
C
>=HHV
(C,
5
) ;
Plot(x,
"Close",colorBlack,styleHistogram|
styleOwnScale);
Plot(Close,
"Close",colorBlack,styleCandle);
Panos
At 03:53 AM 12-09-2008 12-09-2008, you wrote:
Try
the following:
HigherClose = C >
Ref
(C,-
1
);
HigherThanLast4 =
Sum
(HigherClose,
5
) >
4
;
Plot
(HigherThanLast4,
""
,colorBlue,
2
);
Cheers,
Gordon Sutherland
- -----Original Message-----
- From: amibroker@xxxxxxxxxxxxxxx
[
mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of ozzyapeman
- Sent: Friday, 12 September 2008 12:36 p.m.
- To: amibroker@xxxxxxxxxxxxxxx
- Subject: [amibroker] Close > At least 4 of the previous 5
Closes
- Quick question - is there a compact way to write the
following:
- Close > At least 4 of the previous 5 Closes
- I know I can write out each case like:
- Case_1 =
- C > ref(C,-1) and C > ref(C,-2)and C > ref(C,-3)and C >
ref(C,-4)and C > ref(C,-5)
- Case_2 =
- C < ref(C,-1) and C > ref(C,-2)and C > ref(C,-3)and C >
ref(C,-4)and C > ref(C,-5)
- etc....
- and then write if Case _1 or Case _2 or Case_3 or
...
- But I'm guessing there must be a simpler way to do this?
- Any feedback appreciated.
__._,_.___
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 NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
For other support material please check also:
http://www.amibroker.com/support.html
__,_._,___
|