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

[amibroker] Re: MACD and Signal Crossover



PureBytes Links

Trading Reference Links

Hi Graham,

Thanks a lot. I'll try to code it.

Robert


- In amibroker@xxxxxxxxxxxxxxx, Graham <kavemanperth@xxx> wrote:
>
> make one condition a cross and the other condition higher than the 
other
> 
> 
> -- 
> Cheers
> Graham
> AB-Write >< Professional AFL Writing Service
> Yes, I write AFL code to your requirements
> http://www.aflwriting.com
> 
> On 02/01/07, cstdc5588 <cstdc5588@xxx> wrote:
> >
> > Hi All,
> >
> > I have written a simple program.  When MACD and Signal cross over,
> > while MA20 and MA50 cross over, and their directions are the same,
> > the system gives the signal for buying or selling.  Showed as
> > following:
> >
> > Cond = Cross( MA(Close, 20), MA(Close, 50) );
> > Cond1 = Cross( MA(Close, 50), MA(Close, 20) );
> > Cond2 = Cross(MACD(12, 26), Signal(12, 26, 9));
> > Cond3 = Cross(Signal(12, 26, 9), MACD(12, 26));
> > Buy = Cond AND Cond2;
> > Sell = Cond1 AND Cond3;
> >
> > For example:  on the 1st day MA20 and MA50 cross over, on the 2nd 
day
> > MACD and Signal cross over, and their directions are the same, at
> > this point the system gives the signal for buying or selling.
> >
> > For another example:  on the 1st day MACD and Signal cross over, 
on
> > the 2nd day MA20 and MA50 cross over, and their directions are the
> > same, at this point the system gives the signal for buying or 
selling.
> >
> > How to revise the above program in order to satisfy the 
conditions?
> > Any help would be appreciated!
> >
> > Thanks,
> > Robert
> >
> >
> >
> > 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
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
>



Content-Description: "AVG certification"
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.16.3/614 - Release Date: 1/2/2007 2:58 PM