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
.
__._,_.___
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
__,_._,___
|