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

[amibroker] Re: TEMA - Kind Attn : Fred



PureBytes Links

Trading Reference Links



Hi Fred

Thanks for  your reply.

The Goal is to find the price at which TEMA(c,12)-Tema(c,26) is 
equal to EMA((tema(c,12)-Tema(c,26)),9)

Hope u can code it easily.

Thanks once again







--- In amibroker@xxxxxxxxxxxxxxx, "Fred" <ftonetti@xxxx> wrote:
> 
> Please provide both sides of the formula as follows ...
> 
> Part 1 - What's the goal ?
> 
> Part 2 - What do you want to reach the goal ? Price or something 
> else ?
> 
> --- In amibroker@xxxxxxxxxxxxxxx, "fz_iqbal" <stockslover@xxxx> 
wrote:
> > 
> > Dear Fred,
> > 
> > Like Vichoo, I also tried my best with the code u gave, but 
Thanks 
> > Fred I am still unable  to get the price at which TEMA MACD 
cross 
> over 
> > will take place.
> > 
> > I would be highly grateful if you could kindly code the above as 
> this 
> > seems to be more complicated than what visualised earlier.
> > 
> > Fazal
> > 
> > --- In amibroker@xxxxxxxxxxxxxxx, "vichooo_1999" 
> <vichooo_1999@xxxx> 
> > wrote:
> > > 
> > > Hi Fred
> > > 
> > > I have been trying for last 30 mins or so I am unable to 
proceed 
> > > further. Kindly review the code please:
> > > 
> > > P0 = C;
> > > Acc = 0.0001;
> > > LVBI = LastValue(BarIndex());
> > > Mult = 1;
> > > for (i = 0; i < 10; i++)
> > > {
> > > if (P0[LVBI] >= 1)
> > > i = 99;
> > > else
> > > Mult = Mult * 10;
> > > }
> > > // ***********************************************
> > > 
> > > P1 = Ref(P0, 1) * Mult;
> > > UpDn = 100 * P1[LVBI];
> > > 
> > > for (i = 0; i < 200; i++)
> > > {
> > > 
> > > Calc = P1;
> > > Calc = TEMA(P1,12);
> > > Calc = TEMA(P1,26);
> > > Calc=TEMA(P1,12)-TEMA(P1,26);
> > > Calc=EMA((TEMA(P1,12)-TEMA(P1,26)),9);
> > > Goal = TEMA(P1,12)-TEMA(P1,26)==EMA((TEMA(P1,12)-TEMA
(P1,26)),9);
> > > 
> > > if (Calc[LVBI] < Goal)
> > > P1[LVBI] = P1[LVBI] + UpDn;
> > > else
> > > P1[LVBI] = P1[LVBI] - UpDn;
> > > UpDn = UpDn / 2;
> > > if (UpDn <= Acc)
> > > {
> > > j = i;
> > > i = 99999;
> > > }
> > > }
> > > 
> > > Accuracy = 100 * (abs(Goal - Calc) / Goal);
> > > 
> > > Filter = BarIndex() == LVBI;
> > > 
> > > AddColumn(Mult,"Multiplier", 1.0);
> > > AddColumn(Calc[LVBI - 1] / Mult, "Curr Ind Val", 1.9);
> > > AddColumn(Goal / Mult, "Goal Ind Val", 1.9);
> > > AddColumn(Calc[LVBI] / Mult, "Calc Ind Val", 1.9);
> > > AddColumn(j,"Iterations", 1.0);
> > > AddColumn(Accuracy, "Accuray (%)", 1.9);
> > > AddColumn(Ref(P1, -1) / Mult, "Todays Price", 1.9);
> > > AddColumn(P1 / Mult, "Goal Price", 1.9);





------------------------ Yahoo! Groups Sponsor --------------------~--> 
Has someone you know been affected by illness or disease?
Network for Good is THE place to support health awareness efforts!
http://us.click.yahoo.com/Rcy2bD/UOnJAA/cosFAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

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 other support material please check also:
http://www.amibroker.com/support.html

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/