PureBytes Links
Trading Reference Links
|
Hi,
I am coding a strategie where buy-signals are depending on a certain
condition based on MACD(), a condition based on MA() and if a
calculated trendline has been crossed.
The trendline I calculate is based on the number of the bar, where
the other conditions will be true. There of 100s of signals.
The code looks like that (where DownTrendLine is a function):
CrossDownTrend=IIf(BuyMACDCond AND BuyMACond,DownTrendline
(flag),False);
Buy=BuyMACDCond AND BuyMACond AND CrossDownTrend;
This is to prevent the calculation of a trendline when one of the
other conditions is false.
My question is: how can I determine the number of the bar where the
first two conditions become true?
After some hours of checking AFL-examples and studying many AFL-
functions I cannot figure out how to handle this.
Thank you in advance,
enzo
------------------------ Yahoo! Groups Sponsor --------------------~-->
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~->
Check AmiBroker web page at:
http://www.amibroker.com/
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.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/
|