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

[amibroker] Comparing dates in auto analysis



PureBytes Links

Trading Reference Links

I was hoping someone could help me out with this problem. It's been
keeping me occupied for the past several hours and I feel I've
exhausted all means of solving it.

I need a point that exists any day earlier than today and a point that
can only exist today. Here's the current code:

d = DateNum() - 1;
OldSwH = H > Ref(H, -1) AND H > Ref(H, 1);      // AND DateNum() < d;
MorningSwH = H > Ref(H, -1) AND H > Ref(H, 1);       // AND DateNum() == d;

swh1 = ValueWhen(OldSwH, H);
swh2 = ValueWhen(MorningSwH, H);

So MorningSwH would need to be from today and OldSwH would need to be
on any day earlier than today. I could use SelectedValue but that
wouldn't allow for backtesting :-/

I greatly appreciate the help.

Thank you,
Paul

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

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/