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

[amibroker] SPX Buy and Sell Signal



PureBytes Links

Trading Reference Links

I am try to use the SPX as a signal to buy and sell stocks.  When the 
event happens the first time, it is a buy signal.   When the same 
event happens a day (or week) after, it is a sell signal.

Can someone please help me with the correct code.   The below is an 
example but does not work.

Thank you very much.    I have not had good access to a web site for 
the past four months.  Therefore I do not know if this was asked in 
the recent past.   I did check the past month of emails.....

Stan Solak

//Enters long when the faster Moving Average crosses the slower 
moving average.
//Closes the long when the faster MA crosses the slower MA the second 
time, not the same day.
fast=5;
slow=6;

FstC=EMA(C,fast);SloC=EMA(C,slow);
Cond1 = Cross(FstC,SloC);

Buy= Cond1;
Sell=Cond1;

Filter= C>1;
AddColumn(Buy,"Buy");
AddColumn(Sell,"sell");
AddColumn(FstC,"Fast C");
AddColumn(SloC,"Slow C");
AddColumn(Cond1,"C Gt Av");



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->

Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
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/