pad

Click to enlarge

V.14:11 (483-487): 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.


\V14\C11\SIDEBAS.PDFpad$2.95pad



FOR THOSE ORDERING ARTICLES SEPARATELY:
*Note: $2.95-$5.95 Articles are in PDF format only. No hard copy of the article(s) will be delivered. During checkout, click the "Download Now" button to immediately receive your article(s) purchase. STOCKS & COMMODITIES magazine is delivered via mail.


Take Control of Your Trading.
Professional Traders' Starter Kit
All these items shown below only $495!
  • 5-year subscription to Technical Analysis of STOCKS & COMMODITIES, The Traders' magazine. (Shipping outside the US is extra. Washington state addresses require sales tax based on your locale.)
  • S&C on DVD 10.25 plus next year's upgrade FREE!
  • 5-year subscription to Traders.com Advantage.
  • 5-year subscription to Working Money.
  • Free book selection.
  • Save up to 54% by purchasing today. Limited time offer. By purchasing today you also receive your choice of one volume from the Professional Traders' Series (Volumes 1-17 or Charting The Stock Market) for FREE!

    NOTE: Use the "comment" field during checkout to tell us which book you would like to receive.

    Click Here to Order
    You save $502.31 plus the value of the book you choose over the regular price of these items. Offer ends soon.



    Stocks & Commodities magazine Copyright © 1996-2008 Technical Analysis, Inc. All rights reserved. Read our privacy statement. Visit our main Website. www.traders.com

    Phone 1(800) 832 4642 or (206) 938 0570