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

[amibroker] Translating a simple system



PureBytes Links

Trading Reference Links

Guys,

For some reason I'm having trouble translating the following rules
into a system:

1)It has closed below its 10-day moving average for at least 10 days.
2) It is above its 200-day moving average. 3) It made its lowest low
of the recent selloff today. 4) It closed stretched further below its
10-day moving average than it has on any day of the recent selloff.

Here's some of the code I have - but I think my approach is completely
wrong:


MAdiff = C - MA(10,C);
MAlong = MA(200,C);

MAdays = Ref(C,-10) < Ref(MA(C,10),-10) AND Ref(C,-9) <
Ref(MA(C,10),-9) AND Ref(C,-8) < Ref(MA(C,10),-8) AND Ref(C,-7) <
Ref(MA(C,10),-7) AND Ref(C,-6) < Ref(MA(C,10),-6) AND Ref(C,-5) <
Ref(MA(C,10),-5) AND Ref(C,-4) < Ref(MA(C,10),-4) AND Ref(C,-3) <
Ref(MA(C,10),-3) AND Ref(C,-2) < Ref(MA(C,10),-2) AND Ref(C,-1) <
Ref(MA(C,10),-1) AND C < MA(C,10);

Buy = MAdays AND LLV(C,10) AND C > MAlong AND HHV(MAdiff,10);
Sell = C > MA(C,5);


------------------------------------

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
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/