STOCKS & COMMODITIES magazine. The Traders' Magazine

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

  |  JAN 1996

Traders' Tips

TRADERS' TIPS TRADESTATION To create the divergence index in Matt Storz's ""Quantifying Divergence with the Divergence Index,"" you must first create two User-Functions, PeakDivergence and TroughDivergence. The code for both is listed below. Be sure you create and verify these before you build the indicator. Since I have built them as User-Functions, you can now call these functions from any other study or system without having to recreate the code. Type: User-Function Name: PeakDivergence Inputs: Strength(NumericSimple), OSC(NumericSeries); Vars: Hc(0), Hp(0), Hh(0), HL(0), Ic(0), Ih(0), Ip(0), IL(0); Value1=SwingHigh(1,High,Strength,Strength+1); If Value1<>-1 then begin Hp=Hc; Hc=Value1; Ip=Ic; Ic=OSC[Strength]; Hh=Value2; HL=Value3; Value2=Highest(High,Strength+1); Value3=Lowest(High,Strength+1); Ih=Value4; IL=Value5; Value4=Highest(OSC,Strength+1); Value5=Lowest(OSC,Strength+1); ...

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.