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

Re: [amibroker] SPX Buy and Sell Signal



PureBytes Links

Trading Reference Links




Hi Stan - how about something like 
this?
 
fast=5;slow=6;
 
FstC=EMA(C,fast);SloC=EMA(C,slow);Cond1 = 
Cross(FstC,SloC);
 
Buy= Cond1;Buys = Cum( Buy );Sell = Buy AND 
Buys % 2 == 0;Buy = Buy AND NOT Sell;
 
Filter= 
C>1;AddColumn(Buy,"Buy");AddColumn( Buys, 
"buys");AddColumn(Sell,"sell");AddColumn(FstC,"Fast 
C");AddColumn(SloC,"Slow C");AddColumn(Cond1,"C Gt Av");
 
 
Steve
 
----- Original Message ----- 
<BLOCKQUOTE 
>
  <DIV 
  >From: 
  sjsolak 
  
  To: <A title=amibroker@xxxxxxxxxxxxxxx 
  href="">amibroker@xxxxxxxxxxxxxxx 
  Sent: Wednesday, October 01, 2003 10:57 
  AM
  Subject: [amibroker] SPX Buy and Sell 
  Signal
  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");Send 
  BUG REPORTS to bugs@xxxxxxxxxxxxxSend SUGGESTIONS to 
  suggest@xxxxxxxxxxxxx-----------------------------------------Post 
  AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A 
  href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check 
  group FAQ at: <A 
  href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
  Your use of Yahoo! Groups is subject to the <A 
  href="">Yahoo! Terms of Service. 







Yahoo! Groups Sponsor


  ADVERTISEMENT<img
src="" width=300 height=250 border=0>  









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 the Yahoo! Terms of Service.