Sidebar | NOV 1996
SIDEBAR: BASIC and TradeStation Code for Phase Calculation
BASIC CODE FOR PHASE CALCULATION by John F. Ehlers This BASIC code finds the real part of the phasor (the horizontal component) and the imaginary part of the phasor (the vertical component) by summing the product of the price and the two sinusoids over one full cycle of the dominant cycle. The arctangent function locates the phase to be in the first or fourth quadrant. The quadrant ambiguity is removed by adding p to the phase angle is the real part is negative. A value of p/2 is arbitrarily added to the computed phase so the start of the cycle is referenced to a sinewave. The computed phase angle is then tested to fall within the range from zero to 2p. The phase is then converted to degrees from radian measure.
by Technical Analysis, Inc.
Technical Analysis of STOCKS & COMMODITIES
The Traders’ Magazine since 1982
has had over 1,226,237 subscribers from 174 different countries.
37,000 Page Traders’ Archive for $89.99
To continue reading, sign-up for trial access to Traders.com and the S&C Archive — 37,000 pages of trading ideas!
After verifying your email address, you will have limited access to the S&C Archive, as well as access to a Digital Edition of S&C, and access to Traders.com Advantage and Working Money for 30 days.
Not a subscriber to Technical Analysis of
STOCKS & COMMODITIES magazine?
Click
here to subscribe, or request
a trial subscription.
Log-in now to view articles from the S&C Archive.
Your Subscriber ID is located at the top of your magazine label, highlighted here in red.
Your last name can be found on the second line, highlighted here in blue.
*If you have a company name on the label, that can also be used. It will appear below your name on the label.
If you do not have a Subscriber ID on your label, you can find it on your statement or renewal form.
For help locating your Subscriber ID number, please call us at 1-800-832-4642 or send an email to Survey@Traders.com. If sending an email, please include your name and mailing address.