PureBytes Links
Trading Reference Links
|
The convention in EL is to use [ ] , Close[1], to enclose time shifted data. I am not familiar with the formula you are using but I think there are no time shifts in there.... Sid
Terry <MagicTH@xxxxxxxxxxx> wrote: I am trying to convert a function called Twitcher from TradeStation EasyLanguage. Twitcher concept was published in last month's FUTURES Magazine. Code is from a user's group.
QUESTION: Does the following code for y refer to the next bar and next 2 bars or previous bars?
Y = u_2* price+2*u1*y1-u1_2*y2; y2 = y1; y1 = y;
Here's the entire EasyLanguage code (for the twitcher function)
EASYLANGUAGE FUNCTION: Inputs: price(NumericSeries), initLength(NumericSimple); variables: length(0), x(0), y(0), y1(0), y2(0), u(0), u1(0), u1_2(0), u_2(0);
If initLength
<2 then length = 2 else length = initlength; if CurrentBar = 1 then begin x=(1- cosine(360/Length))/0.414213562; u=-x + squareroot(x*x+2*x); u1= 1.0-u; u1_2=u1*u1; u_2=u*u; y1=price; y2=y1; end; y=u_2* price+2*u1*y1-u1_2*y2; y2=y1; y1=y;
TWITCH=Y -- Terry
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
SPONSORED LINKS
YAHOO! GROUPS LINKS
|