PureBytes Links
Trading Reference Links
|
Bill,
When you run the
http://www.amibroker.com/library/detail.php?id=177
for your database, two new artificial tickers are generated,
the "~macdbull" and the "~macdbear".
You may use them in any window as
MACDBULL=Foreign("~macdbull","V");
MACDBEAR= Foreign("~macdbear","V");
For a [0,100] scaling use the
bull=100*MACDBULL/(MACDBULL+MACDBEAR);
bear=100*MACDBEAR/(MACDBULL+MACDBEAR);
The above bull and bear have unique values for all stocks of your
database. For example, if the condition
COND=MACDBULL>MACDBEAR;
is true on 26/7/2002, it is true for all stocks of the database.
This property permits the use of these Breath Indicators in any
trading system, to improve the final performance.
DT
--- In amibroker@xxxx, "bvandyke" <bvandyke@xxxx> wrote:
> Hello all,
>
> In Post 21696, Anthony graciouly included the Coding of the MACD
Bull-
> Bear by Dimitris. As a newbie i find the concept of Composites
used
> this way fascinating and quite innovative.
>
> I have used the Code posted by Anthony and i can see the macbear
and
> macbull daily values in their appropriate graphs on my screen.
>
> However, i'm stumped on how to get either one of them (mcbear or
> macbull daily values) into the columns below the AA forumla window
> for exporting the daily values of each to a .csv file. I've tried
> the techniques i've used with single indicator and all i get is
a "1"
> or "0" for the column value, depending on what i do. With
> composites, is there something different i must do?
>
> One thing i have tried adding to Anthony's posted code is:
>
> Filter =1;
> NumColumns =1;
> Graph0= Column0
> Graph0 = AddToComposite(Values5,"~macdbear","V");
>
> All this does is return the macbear ticker, individual date, and
the
> value of "0" in Column 0 for each day. Any help would be so very
> much appreciated. Thank you in advance.
>
> Bill
>
>
>
>
> --- In amibroker@xxxx, Anthony Faragasso <ajf1111@xxxx> wrote:
> > Tomasz,
> >
> > I agree with you , after having just read the article from the
link
> you posted, It is a sad day indeed.
> >
> > How about using the script that is suggested, (whew!!!) , to
create
> such an indicator / compositie, With
> > Amibroker it is so simple:
> >
> > /* By Dimitris Tsokakis */
> > /*MACD BULL-BEAR*/
> > ob=Signal()<MACD();
> > os=Signal()>=MACD();
> > values5 = os>0;
> > values6 = ob>0;
> > AddToComposite(Values5,"~macdbear","V");
> > AddToComposite(Values6,"~macdbull","V");
> > Buy=0;
> >
> > Seven lines of code and it is completed, The script has what 100
> lines ? My choice is Amibroker by far.
> >
> > Best Wishes
> > Anthony
|