Hi jolly,
So what language was the original code written in?
Hard to do any translation when one doesn't know what to convert
from. AVG has a particular definition in AFL (check the help
file). Telechart PCF's use a convention like AVGH3.5 to mean
the a 3 day average of the high 5 days ago. In AFL that would be
REF(MA(H,3),-5) .
Other languages have different conventions, so I'm not going to work on
your supplied code until I know what I'm working with. I could be wasting
a lot of time, you understand? I'll be happy to work on anyone's
translation to AFL, provided I have the whole code (I'm not interested in
doing things in bit and pieces), the identity of the original programming
language, and I know the original code language. I used to be pretty
fluent in MA, TS, TC, QP, and several others -- AFL became my choice years ago.
Anyway, post the info I need and I'll be happy to help -- probably after
market hours as I have to get back to trading.
Peace and Justice --- Patrick
----- Original Message -----
Sent: Thursday, March 04, 2010 4:59
AM
Subject: [amibroker] Hook Pattern
Hi,
I have attempted a conversion to AFL of this formula and am stuck with what
substitutes in AFL for AVG (average) . It is not 'moving average'
. I'm not even sure if the MIN & MAX are right. I am new
(still) Please.
This
; ((L1 = MINL4) OR (L2 = MINL4) OR (L3 = MINL4) ) AND ( (MAXC3 <
MAXC4.3)) AND( (H3 = MAXH15.4) OR (H4 = MAXH15.4) OR (H5 = MAXH15.4) OR
(H6 = MAXH15.4) OR (H7 = MAXH15.4) ) AND (((MAXH4.3 - MINL4) / (MAXH4.3 -
MINL21.3) > .23) AND ((MAXH4.3 - MINL4) / (MAXH4.3 - MINL21.3) <
.62) ) AND ((AVGH3.5) > (AVGH3.8 ) AND (AVGH3.8 ) > (AVGH3.13) AND
(AVGH3.13) > (AVGH3.18 ))
to
AFL
////////////////////////////////////////////
O1 =
Ref(O,-1);O2 = Ref(O,-2);O3 = Ref(O,-3);O4 = Ref(O,-4); H1 = Ref(H,-1);H2 =
Ref(H,-2);H3 = Ref(H,-3);H4 = Ref(H,-4);H5 = Ref(H,-5);H6 = Ref(H,-6);H7 =
Ref(H,-7); L1 = Ref(L,-1);L2 = Ref(L,-2);L3 = Ref(L,-3);L4 =
Ref(L,-4); C1 = Ref(C,-1);C2 = Ref(C,-2);C3 = Ref(C,-3);C4 = Ref(C,-4);
"J-Hook Pattern" ; J1 = ((L1
= Min(L4, L) OR (L2 = Min(L4, L) OR (L3 = Min(L4, L)) && ((Max(C3,
C) < Max(C4, 0.3)) && ((H3 = Max(H1, 5.4) OR (H4 = Max(H1, 5.4) OR
(H5 = Max(H1, 5.4) OR (H6 = Max(H1, 5.4) OR (H7 = Max(H1, 5.4)) &&
(((Max(H4, 0.3) - Min(L4, L) / (Max(H4, 0.3) - Min(L2, 1.3) > 0.23)
&& ((Max(H4, 0.3) - Min(L4, L) / (Max(H4, 0.3) - Min(L2, 1.3) <
.62)) && (MA(H3, 0.5) > MA(H3, 0.8) && MA(H3, 0.8) >
MA(H3, 0.13) && MA(H3, 0.13) > MA(H3, 0.18
));
////////////////////////////////////////////
__._,_.___
**** 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/
__,_._,___
|