Bill, 

Thank you. I didn't notice that. I guess that I am doing this all wrong. What I 
want is to have the condition met when the gap between the MACD and Signal is 
closing. 

I want the buy condition to be when the MACD is below the Signal and the gap is 
closing and the sell to be when the MACD is above the signal and closing. 

Would this work?
//Buy Signals
Hist1 = MACD() - Signal();
Hist2 = Signal() - MACD();
Condition1 = MACD() > Ref(MACD(),-1);
Condition3 = Hist1 < Ref(Hist1, -1);
//Sell Signals
Condition11 = MACD() < Ref(MACD(),-1) AND MACD() > 0;
Condition3 = Hist1 < Ref(Hist1, -1);

//Buy and Sell orders
Buy = Condition1 AND Condition3;
Sell =Condition11 AND Condition3;
//Short and Cover conditions

Short=Sell;

Cover=Buy;

I Tried it, but it didn't work.

  ----- Original Message ----- 
  From: wavemechanic 
  To: [email protected] 
  Sent: Friday, October 26, 2007 12:19 PM
  Subject: Re: [amibroker] MACD Histogram



  I don't think so.  Your buy = macd > ref(macd) and hist < ref(hist).  
However, the data you presented has macd > ref(macd) and hist > ref(hist) so 
the buy condition was not satisified.

  BillRecent Activity
    a..  47New Members
    b..  1New Files
  Visit Your Group 
  Yahoo! News
  Get it all here

  Breaking news to

  entertainment news

  Yahoo! Finance
  It's Now Personal

  Guides, news,

  advice & more.

  New business?
  Get new customers.

  List your web site

  in Yahoo! Search.
  . 
   

Reply via email to