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

Re: [amibroker] MACD Histogram



PureBytes Links

Trading Reference Links

Bill,
 
Thank you so much. I made the changes that you suggested and it seems to work.
 
Tom
 
Sent: Friday, October 26, 2007 7:26 PM
Subject: Re: [amibroker] MACD Histogram

Your code and words don't match.  I assume that your words are correct.
 
"I want the buy condition to be when the MACD is below the Signal and the gap is closing"
 
buy = macd() < signal() and hist < ref(hist, -1);
 
"and the sell to be when the MACD is above the signal and closing"
 
sell = macd() > signal() and hist < ref(hist, -1);
 
Bill
----- Original Message -----
Sent: Friday, October 26, 2007 9:13 PM
Subject: Re: [amibroker] MACD Histogram

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 -----
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.
 
Bill
.


No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.503 / Virus Database: 269.15.10/1091 - Release Date: 10/24/2007 2:31 PM

__._,_.___

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html




Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___