STOCKS & COMMODITIES magazine. The Traders' Magazine
Request Information
From Advertisers
Traders.com
Stocks &
Commodities

  • Subscribers' Area
  • Current Issue

  •    - Opening Position
       - Letters to S&C
       - Traders' Tips
       - Futures Liquidity
       - News & Products
       - Books
       - Websites for Traders
       - Cover Art

  • Free Articles
  • Article Abstracts
    1996-Present
  • Complete Articles
    1982-Present
  • Novice Traders' Notebook
  • Glossary
  • Subscribe
  • Renew
  • Free Trial
  • Search
  • Working
    Money
    Traders.com
    Advantage
    Traders'
    Resource
    Online Store
    Message Boards
    Article Code
    Free Newsletter
    Products
    Search
    Help
    Subscribe
    Renew
    Contact Us
    Home

    Enter search terms:


    Products
    Small Book Image for Store.Traders.comStore.Traders.com
    Purchase past articles on hundreds of topics, along with software, books, and magazine subscriptions over a secure web connection. Click Here

     
    Search Products:

    @ Online Store!
    S&C Magazine Subscriber Login
    S&C Free Trial Issue
    S&C Volume Books
    S&C Magazine
    S&C on DVD
    Software
    Articles
    FREE ARTICLES! (while they last)
    Best Choice Software
    High Growth Stock Investor
    Option Credit Spreads On ...
    Daytrading With TheStockBandit ...
    The Trading Plan
    Support & Resistance ...
    eSignal 10 and Advanced GET ...
    Trading By Tape-Reading
    Buying Straddles
    Trading With The Directional Ratio
    NeuroShell Trader 5
    GTS Pro
    Between Price And Volume
    Point & Figure for Forex
    Direct Pro
    Profitunity Home Study Course
    Adrienne Toghraie
    MultiCharts 2 (Part 2)
    Steve Nison's Profiting In ...
    MESA8
    ChartSmart
    MultiCharts 2 (Part 1)
    Forex Volatility Patterns
    C. Kirk of TheKirkReport.com
    StrataSearch 3.0
    Profiting From The Gartley
    Market Dynamics
    IBFX-GPS
    Elwave 8
    Henry "Hank" Pruden
    Random Walk Trading
    OmniTrader
    HotScans
    A Window to Our Workshop
    Stock Trading Success
    Traders' Resource
    Advisory Services
    Books
    Brokerage
    Consultants
    Courses & Seminars
    Data Services
    Exchanges
    Hardware
    Mutual Funds
    Online Trading Services
    Publications & Newsletters
    Software
    Trading Systems

    Information Directory
    S&C Tour
    S&C Magazine
    Resources
    Products
    Subscribe
    This Month's Issue
    Home | S&C Magazine | Working Money | Traders' Resource | Message-Boards | Store

    SYSTEM DESIGN



    Debugging Your System

    If At First You Don't Succeed

    by John Clayburg
     


    Systems you create don't always work quite right at first. And when you revise them, your "improvements" don't necessarily help. It's what you ordered ... but not what you wanted. What to do? For those who use EasyLanguage, here's the solution.

    Sooner or later, those who write computer program code, whether for personal strategies or for programming for others, must face the task of correcting errors or making changes in their work. The process of finding and correcting program errors, often referred to as debugging, can be as challenging and frustrating as writing the program code itself. To effectively and efficiently make changes in program code, often you must determine values for specific variables on selected bars on a chart. Many software platforms provide multiple utilities within their frameworks specifically for this purpose.

    For the purposes of this article, I'll concentrate on the processes that can be used to debug programs written on the EasyLanguage system and indicator development platform. The routines presented here are equally applicable to TradeStation 4.0, ProSuite 2000i, and the current online version, TradeStation 6.0.

    DEBUGGING WITH THE PRINT STATEMENT

    EasyLanguage contains within its basic structure a specific debugging routine, which comes into use when writing print statements into your program code. The print statement will deliver specific variable values to the debug window in the power editor, to a file, or to a printer.

    This debugging tool is very thorough in that it sends the requested information to the designated output device for every bar on the chart on which the analysis technique is applied. To interpret these outputs, a date (and time, if testing intraday data) should be included as the first two output characters. This allows you to eventually track down the specific values of the variables for the section of the chart on which the program errors have been identified.

    Although the print statement method of debugging programs is thorough, it is somewhat complicated to program and time-consuming to decipher. Each variable output must be individually formatted for proper calculation. Most often, you are only concerned with a few bars on the chart where you have observed errors. You must observe the actual values being calculated by the code to make the necessary corrections. Since each bar on the chart in question results in a new line of output data, sifting through the data in search of the specific bar on which the error is evident can be a lengthy, error-prone process.
     

    FIGURE 1: System setup. This system considers two stochastic values and a support level.

    ...Continued in the March 2002 issue of Technical Analysis of STOCKS & COMMODITIES
     



    John Clayburg has been involved in trading and systems development for more than 20 years. He also offers custom programming services for TradeStation users. He may be reached at clayburg@pionet.net or www.clayburg.com.


    Excerpted from an article originally published in the March 2002 issue of Technical Analysis of STOCKS & COMMODITIES magazine. All rights reserved. © Copyright 2002, Technical Analysis, Inc.



    Return to March 2002 Contents

    Technical Analysis, Inc.

    [Home | Working Money Magazine | S&C Magazine | Traders.com Advantage | Online Store]
    [Traders' Resource | Add a Product to Traders' Resource | Message Boards]
    [Subscribe/Renew | Free Trial Issue | Article Code | Search | Help Files]
    Departments: [Advertising | Editorial | Circulation | Employment | Contact Us]

    Copyright © 1996-2008 Technical Analysis, Inc. All rights reserved. Read our privacy statement.

    Technical Analysis, Inc.
    Subscribe! Free E-mail Newsletter.
    First: Last:
    E-mail: