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

[amibroker] Referencing values of a function and optimizing it


  • Date: Thu, 19 Nov 2009 19:52:49 +0100
  • From: "Markus Witzler" <funnybiz@xxxxxx>
  • Subject: [amibroker] Referencing values of a function and optimizing it

PureBytes Links

Trading Reference Links



Hello,
 
I designed the following function which creates an exponential moving average:
 

function Fast_EMA( period )
{
EMA_fast[
0 ] = close[ 0 ]; seed value is being set

for( i = 1; i < BarCount; i++ )
{
EMA_fast[ i ]
=EMA_fast[i-1]+(close[i]-EMA_fast[i-1])*2/(period+1);
}

return EMA_fast;
}

Now, when I later want to reference a value of the function, do I use this: EMA_fast[i]

And when  want to optimize the length of my exp. moving average, do I use this:

period=Optimize ("Fast EMA length", 50, 10, 150, 10);

fast_EMA( period );

Thanks for clarifying

Markus



__._,_.___


**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/





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

__,_._,___