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

Re: [amibroker] Algorithm for estimating an ema cross



PureBytes Links

Trading Reference Links

how do i add this to
the new amibroker.
yes this formula
Thanks

Natasha !! <dynomitedoll_ddd@xxxxxxxxx> wrote:
Hello,
       Sorry the value for close is tclose in the below formula .
 
 -- N !!


Natasha !! <dynomitedoll_ddd@xxxxxxxxx> wrote:
Hello,
        Formula courtesy Dimitris Tsokakis:
 
  

_SECTION_BEGIN("#-PredictCross");

 

// Probable MAcross bars

//p=20;

p=Param("fast",8,3,30,1);MAp=EMA(C,p);

//k=30;

k=Param("slow",13,3,30,1);MAk=EMA(C,k);

y=p*EMA(C,p)-(p-1)*Ref(EMA(C,p-1),-1);//Plot(y," ",colorPlum);

tClose=(p*(k-1)*MA(C,k-1)-k*(p-1)*MA(C,p-1))/(k-p);

DescCrossPrediction=Cross(tClose,C);

AscCrossPrediction=Cross(C,tClose);

ExpectMAcross=DescCrossPrediction OR AscCrossPrediction;

Confirmed=Cross(MAk,MAp) OR Cross(MAp,MAk);

UR=2*Highest(ROC(C,1));LR=2*Lowest(ROC(C,1));

Ucoeff=1+UR/100;Lcoeff=1+LR/100;

Filter = 1;//for the autoanalyser

//Filter=tClose<Lcoeff*C OR tClose>Ucoeff*C;//for the graph

AddColumn(MAp,"MAp");

AddColumn(MAk,"MAk");

AddColumn(Confirmed,"C-Cr");

AddColumn(ExpectMAcross,"Ex-Cr");

Plot(C,"",7*Filter+1,64);

Plot(MAp,"",4,1);Plot(MAk,"",5,1);

bars=BarsSince(Cross(MAp,MAk) OR Cross(MAk,MAp));

expect=NOT(Filter);

Title=Name()+" , "+

WriteIf(expect AND NOT(expectMAcross) AND NOT(Confirmed) AND bars>3 AND tClose<C,"EXPECT a bearish MAcross SOON","")+

WriteIf(expect AND NOT(expectMAcross) AND NOT(Confirmed) AND bars>3 AND tClose>C,"EXPECT a bullish MAcross SOON","")+

WriteIf(DescCrossPrediction,"EXPECT a bearish MAcross TOMORROW","")+

WriteIf(AscCrossPrediction,"EXPECT a bullish MAcross TOMORROW","")+

WriteIf(Confirmed,"--Confirmed_Cross","");

//In many cases Now, there is one "EXPECT SOON" AND one "EXPECT TOMORROW".

GraphXSpace=8;

_SECTION_END();



Eugene <eugenecpinto@xxxxxxxxxxx> wrote:
ema is calculated by using the following formula

  PDA = Prior Day's Average (Begin with simple MA, thereafter PDA is
an exponential value.)

Exp = Exponent

CDV = Current Day's Value (If you are averaging a stock price, CDV is
today's price.)

EMA = Current Day's Exponential Moving Average

The formula to calculate the exponential average with this method is:

(CDV * Exp) + (PDA * (1 - Exp)) = EMA


I want to be able to estimate the close needed for and ema cross...

Any idea on how to accomplish it?

Thanks




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





Warm regards,
Natasha !!


Discover Yahoo!
Use Yahoo! to plan a weekend, have fun online & more. Check it out!

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





Warm regards,
Natasha !!

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

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




Do you Yahoo!?
Read only the mail you want - Yahoo! Mail SpamGuard.

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