PureBytes Links
Trading Reference Links
|
Hi
I'm trying to implement a system which uses different Buy/Sell rules
depending on the condition of a certain indicator. I'm using a 100
period linear regression of the Russell 2000 as this indicator.
Cond6 = LinearReg( Foreign( "^RUT", "Close" ),100);
Cond7 = Ref( LinearReg(Foreign( "^RUT", "Close" ),100),-1);
Buy=C>EMA(Close,100);//Buy signal 1
Sell=C<EMA(Close,100);//Sell signal 1
Buy=RSI(2)<2;Buy signal 2
ApplyStop( stopTypeNBar, stopModeBars,4 );//Sell signal 2
Essentially,if Cond6>Cond7 I wish to use buy/sell signal #1. If not
use Buy/Sell signal 2.
Have tried IIF Function as well as if-else loop, but no luck so far.
Any help would be appreciated
Regards
Haders
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/
|