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

[amibroker] Help with some Coding



PureBytes Links

Trading Reference Links

Hello All,

I want to code the following conditions and would welcome some help.
I've included my attempt of the code but would appreciate comments as
to whether this is an accurate translation into AB code.


Conditions:

1: Calculate the number of Bars (x) since the last time High crossed
above the HHV of the High over the last 30 periods.
2. The value of RSI(14) x periods ago should be more than the current
value of RSI(14)

eg. If the output from condition 1 was say 8, then condition 2 would
be RSI(14)>Ref(RSI(14),-8)


My attempt at the Code:

x:=BarsSince(Cross(H,Ref(HHV(H,30),-1)));
RSI(14)> Ref(RSI(14),x*-1)

Would this work?


Thanks in advance,

Chorlton



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/