PureBytes Links
Trading Reference Links
|
It is strange, but true.
They calculate Arc Tangent in degs !!
So, their Arc Tangent(Im/Re) will be, say, 60 degs and their period
will be 360/60=6.
For your calculation, use 6.28/atan(Im/Re), because atan in AFL
returns a result in Radians.
You may also use != (not equal to) instead of > or <
Period=iif(Im!=0 and Re!=0,6.28/atan(Im/Re),0);
Dimitris Tsokakis
--- In amibroker@xxxx, "DIMITRIS TSOKAKIS" <TSOKAKIS@xxxx> wrote:
> --- In amibroker@xxxx, Tom McDaniel <tmtempe@xxxx> wrote:
> > Hi all-
> >
> > Period = Iif((((Im > 0) or (Im < 0) )and ((Re < 0) or (Re > 0))),
> > 360/Atan(Im/Re),0);
> A note for this point:
> Atan(Im/Re) will give you the result in radians
> "Returns the arc tangent of NUMBER or ARRAY. The value is returned
in
> radians"
> I do not know what is period for the author, but is not usual to
> devide deg/rad.
> I will suppose here the use of 6.28/Atan(Im/Re) instead of
> 360/Atan(Im/Re), but I want to know better what is period for the
> author.
> D.T.
|