Re: [amibroker] Re: Conditional Buy/Sell modelling in AB

2009-11-04 Thread Nick de Peyster
Thanks. works great. --- On Wed, 11/4/09, sebastiandanconia wrote: From: sebastiandanconia Subject: [amibroker] Re: Conditional Buy/Sell modelling in AB To: amibroker@yahoogroups.com Date: Wednesday, November 4, 2009, 1:10 PM   You can use "Foreign" to refer to what happen

[amibroker] Re: Conditional Buy/Sell modelling in AB

2009-11-04 Thread sebastiandanconia
You can use "Foreign" to refer to what happens with the SP500. Ex. BASE=Foreign("^GSPC","C",1); //^GSPC is Yahoo!'s symbol for SP500 Buy=Cross(BASE,EMA(BASE,200)); //Buy on SP500 cross above 200 EMA Sell=Cross(EMA(BASE,200),BASE); //Sell on SP500 cross below 200 EMA Sebastian --- In amibro

[amibroker] Re: Conditional buy

2009-02-17 Thread Mike
Try something like this... Mike MA50 = MA(Close, 50); CrossOver = Cross(MA50, Close); CrossUnder = Cross(Close, MA50); LowRSI = RSI() < 30; BarsSinceCrossOver = BarsSince(CrossOver); BarsSinceCrossUnder = BarsSince(CrossUnder); Buy = LowRSI AND BarsSinceCrossUnder < BarsSinceCrossOver AND Bars