V. 6:7 (268-271): SIDEBAR: Testing your macros

V. 6:7 (268-271): SIDEBAR: Testing your macros
Item# \V06\C07\SIDEBT.PDF
Availability: In Stock

Product Description

Testing your macros

The lines between the {Down} macros separate the processing. Each macro is a separate line and you rename each macro as '\x in order to test it separately. You can use other letters if you choose. I always use '\x for test macros in order to avoid confusion.

Next, set up the range name for Range1, Range2, Counter1, and Counter2 using the /Range Name Down command. Lastly, when it is time to invoke the macro, put the cursor somewhere such that you can observe the down movement, and hit Alt x.

Enhanced uses of {Down}

If you read the documentation for 2.0, you probably know the tedium of typing multiple {Down}s has been relieved by allowing you to write {Down 5} in order to get the cursor to move down 5 when the macro is invoked. The first macro demonstrates this improvement.

Using {Down} with a range name

Less well publicized is that {Down} will take a range name as the number of time to move down. For the second example, you invoke {Down Counter1} and the macro would drop by the number found in the range Counter1. There will be situations in developing technical analysis programs in which the cursor must {Down} some number of rows which you have calculated. Some other part of the program could calculate that value, store it in Counter1, and then use it in the {Down Counter1} command.

*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. After paying for your subscription at store.traders.com users can view the S&C Digital Edition in the subscriber's section on Traders.com.

Take Control of Your Trading.
Professional Traders' Starter Kit
All these items shown below only $299.99!
  • 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.)
  • 5 year access to S&C Archive
  • 5 year access to S&C Digital Edition
  • 5-year subscription to Traders.com Advantage.
  • 5-year subscription to Working Money.
  • Free book selection.
  • Click Here to Order