PureBytes Links
Trading Reference Links
|
// PREV
Z =(A*B)+(C*PREV);
can be written in AFL as:
Z = AMA2( A(array), B, C );
also:
xx = FactorA * Close + (FactorB * PREV(xx)); //
metastock
translates to:
xx = AMA2( Close, FactorA, FactorB );
Group,
I would like
to see some working code for a Self Referencing Formula. That is where the
previous value of the indicator is used in calculating the new value of the
indicator. Ref() doesn't automatically initialize itself - like
MetaStock does.
The problem is with how to initialize the array.
The pseudo-code might look like:
Start: On the first bar set Arg
= Close;
On the next pass, do some math and calculate
"Factor(Arg)"
Then NewArgVal = Factor * Arg;
Arg = NewArgVal; Plot NewArgVal;
Loop
to Start.
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
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 Sponsor |
ADVERTISEMENT
![click here]() | |
![]() |
Yahoo! Groups Links
|