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

[amibroker] Coding a formula



PureBytes Links

Trading Reference Links

Hi All,
 
I would like to code the formula described is the attached picture.
I tried serveal formulas such as :
 

RoR=ROC(Close,1,False);

 

Lambda=Optimize("Lambda",0.5,0.1,1,0.05);
Length = Optimize ("MML",20,10,30,1);

for (i =0 ; i < BarCount ; i=i+1)

{

ExpMovAver = ExpMovAver + (Lambda*Sum(((1-Lambda)^i)*Ref(RoR,(Lastbar-i)),Length));

}

 

or

ExpMovAver =Lambda*Sum(((1-Lambda)^Currentbar)*Ref(RoR,(Lastbar-Currentbar)),Length);

Can anyone tell me what is wrong?

 

In addition I was wondering whether there is a way to run a formula step by step and watch the behavior of different ellements?

 

Many thanks for your help.

 

Mikael



Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail __._,_.___

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




Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Attachment: Description: image/citrix-pjpeg