PureBytes Links
Trading Reference Links
|
Hi Don,
Here is a simple backtest to demonstrate what I think your after, and below is an indicator.
//Backtest code
x = Optimize("", 50, 30, 50, 5 );
y = Optimize("", 5, 2, 10, 1 );
z = MA(C,x)+y; //Displaced by "y"
Buy = Cross(C,z); //Buy when the close crosses up through the MA
Sell = Cross(z,C); //Sell when the close crosses below MA
Buy = ExRem(Buy,Sell); //Eliminate excessive signals
Sell = ExRem(Sell,Buy);
//Indicator Code
z = MA(C,50)+5; //Here is a 50 period SMA displaced by 5
Plot(z,"Displaced 50 Period SMA",1.2);
Regards,
William Peters
-----Original Message-----
From: Don Carlson <dcarlson007@xxxxxxx> [mailto:dcarlson007@xxxxxxx]
Sent: February 15, 2003 4:00 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Displaced Moving Averages
Does anyone know if AB is capable of ploting Displaced SMA's? And/or
if it's possible to optimize Displaced SMA's with backtests?
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
|