STOCKS & COMMODITIES magazine. The Traders' Magazine

Register or Log In — Traders.com and STOCKS & COMMODITIES magazine

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

NOT A SUBSCRIBER?

To continue reading, sign-up for trial access to Traders.com and the S&C Archive37,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.



DEPARTMENTS: Advertising | Editorial | Circulation | Contact Us | BY PHONE: (206) 938-0570

PTSK — The Professional Traders' Starter Kit
Home — S&C Magazine | Working Money Magazine | Traders.com Advantage | Online Store | Traders’ Resource
Add a Product to Traders’ Resource | Message Boards | Subscribe/Renew | Free Trial Issue | Article Code | Search

Copyright © 1982–2024 Technical Analysis, Inc. All rights reserved. Read our disclaimer & privacy statement.