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

RE: [amibroker] MACD and EMA - Help



PureBytes Links

Trading Reference Links




Unless 
you are prescient you should use delay 1, open.  
<FONT face=Arial color=#0000ff 
size=2> 
<FONT face=Arial color=#0000ff 
size=2>d

  
  <FONT 
  face=Tahoma size=2>-----Original Message-----From: Barry 
  Scarborough [mailto:RazzBarry1@xxxxxxx] Sent: Wednesday, December 
  10, 2003 12:04 PMTo: amibroker@xxxxxxxxxxxxxxxSubject: 
  [amibroker] MACD and EMA - HelpI ran a back test 
  using EMA 5/20 on the R2K buying and shorting as the averages crossed. I 
  used a $50,000 initial investment, Stop set at 15% loss and bought/sold on 
  the open, delay 0. I am not sure which day open value was used with a 
  delay of 0. The results I got was a 3.7 billion dollar profit since Dec of 
  1987. Is that for real??? If so why aren't we all 
  billionaires?What really made me wonder is that if I use a delay of 1 
  day, trying to point to the next day's open, the results were drastically 
  different. Ditto if I use a close and delay of 0. In some cases it 
  went from a huge profit to a loss just by changing the trading day. 
  What is going on? I am not sure how to use the delay option.The 
  formula I used is against index RUT, from 9/10/87 to 12/9/03, isBuy = 
  Cross( EMA(C,5), EMA(C, 20));Sell = Cross( EMA(C, 20), EMA(C, 
  5));Cover = Buy;Short = Sell;Filter = 1;A friend does not 
  believe these results either and wanted to run a separate program it 
  verify the results. Can anyone tell me the C formula for EMA?The 
  EMA adds a percentage of the last close, or whatever, to the current day. 
  But what percentage does it add to each day when a lot of days are used? 
  This comes into play when you are using many days, 5 and 20 or whatever 
  number of days. MACD using the EMA but with three different periods. 
  If someone already has a function that calculates the EMA in C or 
  some other language that would be even 
  better.Thanks,BarrySend 
  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 









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.