[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: loop?



PureBytes Links

Trading Reference Links

1. Doing loops

The moment MetaStock finaly comes equiped with the VBA for add-on, as was publicly
announced in the Fall 1995 (2)-edition of the Equis' Monitor Newsletter (see below),
eg thus way overdue (or else misleading !!!), you will be able to do so.

Actualy, why don't we hear anything more from Equis on this VALID announcement,
eg as can also publicly be seen as it is still hanging on the website, thus as a publicly
available webpage ? (but hanging to do what ?)

Equis International Monitor Newsletters
http://199.234.225.19/customer/newsletters
http://www.equis.com/customer/newsletters

On the other hand, by using the MetaStock + its sub-programs in combination
with the as-fast-as-lightning Microsoft's ScriptIt automating program, you
will be able to do these type of things and many many other things, eg like
creating more (any) automation jobs (in Windows 9.x/NTx.x and in Windows'
compatible programs). (Tho, it will require some practising).

See my homepage for more details on the ScriptIt-program
http://home.wxs.nl/~anthmaas/

2. For...Do...Else  (or For...Do)  (or For...Next)  (or If...Then...Else)
    (or When...True...Do)  (or When...False...Do) statements:

See the If() - function's section below

Regards,
Ton Maas
ms-irb@xxxxxxxxxxxxx
Dismiss the ".nospam" bit (including the dot) when replying.

cc - support@xxxxxxxxx   (for an answer to the above raised VBA question, please)
cc - suggestions@xxxxxxxxx

=============================================

----------------------------------------------------------------------------------------------------------------
Part below is taken from the Fall 1995 (2)-edition of the Equis' Monitor Newsletter 
----------------------------------------------------------------------------------------------------------------

2) Why doesn't MetaStock for Windows have macros?

The changes to MetaStock for Windows (layouts, templates, named-charts, etc.)
have reduced the need for macros. For example, you can now display specific
indicators and rotate through securities; apply a template to numerous
security files; or print multiple charts - all in a few steps without needing macros.

Microsoft has defined a standard macro language ("VBA") that is used by only
a few programs. The advantage of a standard language are huge - you'll only
have to learn one set of macro tools. Rather than implementing our own
non-standard macros, we plan to use the new VBA macro language when tools
for its implementation become available. In the meantime, there are many
third-party macro programs available for Windows. You can use one program
to automate all of your Windows programs.
(What you learn automating MetaStock, you can apply to automating any of
your Windows programs.)

==========================================================

>From the MetaStock (6.5) build-in Help

---------------------
The if() function
---------------------

The if() function (MS-man. p. 207+230) is used to create conditional (i.e., "if-then")
statements. It is perhaps the most used function in the MetaStock formula language.
It contains three parameters as shown in the following example

if( close > mov(c,10,s), rsi(9), rsi(14) )

The above "if" statement reads (in English) as follows:
If today's close is greater than today's 10-day simple moving average of the close,
then plot a 9-day RSI, otherwise, plot a 14-day RSI.

The next formula plots "positive volume" if the close is greater than the median price.
Otherwise, "negative volume" is plotted.

if( CLOSE > (HIGH+LOW)/2, +V, -V )

A good example of the if() function can be found in the On Balance Volume example
(see On Balance Volume MS-man. p. 274).
{however, this is formula is plain wrong, see the detailed correct natural OBV formula
in the MS man.(p 467), in which formula 3x  if() function statements are to be
calculated to come to the REAL OBV-indicator.}

If you simply want an expression to be evaluated as either true or false, it can be
done without the use of the if() function.
The following formula will result in either a 1 (true) or a 0 (false)

rsi(14) > 70

The above formula statement reads (in English) as follows:
If the 14-period RSI is greater than 70, then this formula will evaluate to "true" and
return the number 1.
If it is below 70, the formula will evaluate to "false" and return the number 0.
This is done without the if() function being used.
The formula below uses the if() function and will return the same results, but it is longer.

if(rsi(14) > 70, 1, 0 )


SYNTAX         if( DATA ARRAY  > >= < <= <> =  DATA ARRAY,
                                                         THEN DATA ARRAY, ELSE DATA ARRAY )
FUNCTION     A conditional function that returns the second parameter (THEN)
                         if the conditional expression defined by the first parameter is true;
                         otherwise, the third parameter is returned (ELSE).
EXAMPLE      The formula "if(1<2,3,4)" will always return the value three.

================================================

----- Original Message ----- 
From: jupu <jupu@xxxxxxxxxxxxxxx>
To: <metastock@xxxxxxxxxxxxx>
Sent: maandag 19 juli 1999 22:55
Subject: loop?


> Is it possible to program a 'loop until' or 'fo next' in the explorer?
> Thank for help!!
> 
> 
> 
> 
> 




  • References: