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

[amibroker] Bar query



PureBytes Links

Trading Reference Links

Hey all,

How do I test whether a bar has (a) crossed an MA and, (b) remained 
below an MA for, say, 2 days in a row? I know how to test for each of 
OHLC crossing individually, but what the about the whole bar itself?

Cross(EMA(C,Days),C);  // C crosses below EMA - days being my predefined 
term for the ema

Am I correct in thinking that separate statements (as per above) for 
each of OHLC  will never return a value because the H cannot be crossing 
AND be below the EMA on the same bar? Or am I confusing the issue?

Many thanks,
Andrew.


------------------------ Yahoo! Groups Sponsor --------------------~--> 
Has someone you know been affected by illness or disease?
Network for Good is THE place to support health awareness efforts!
http://us.click.yahoo.com/Rcy2bD/UOnJAA/cosFAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

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 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/

<*> 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/