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

Re: Odd problem in trying to write an indicator



PureBytes Links

Trading Reference Links

Forgot to define your Functions.

       100 * (RSI - BollingerBandBottom) / (BBTop - BBBottom)

Just applying this custom formula, will give 'errors'.

The Function RSI can be called automatically, but the other three(3) BB's
for Functions will have to be defined first.

There are 2 ways you can do this:
1. Referencing the Function(s) via the FORMULA CALL Function
    (FML "your formula"{and optionaly} ;"your function")
2. Pre-assigning the Function(s) upfront (your formula) as VARIABLES
    ("shortname":="formula";)
-------------------------------------------------------------------------------------
3. Note that these calls/vars(1+2) should exactly match the/any name 
    of a (custom) formula (formula name) that is referenced (eg that are
    being 'called' upon in the Functions or for the Vars)
4. Additionaly, when creating your custom formulas, you can use the "Function" button 
    for easy "Select" + "Paste" jobs

References, for:
1. MSK65-man. page 226/227
2. MSK65-man. page 209/211
3. MSK65-man. page 208/209
4. MSK65-man. page 269/270

Regards,
Ton Maas
ms-irb@xxxxxxxxxxxxxxxx
Dismiss the ".nospam" bit (including the dot) when replying and
note the new address change. Also for my Homepage
http://home.planet.nl/~anthmaas


----- Original Message ----- 
From: Owen Davies <owen@xxxxxxxxxxxxx>
To: <metastock@xxxxxxxxxxxxx>
Sent: dinsdag 14 december 1999 14:26
Subject: Re: Odd problem in trying to write an indicator


> Adam Hefner pointed out:
> 
> 
> > Owen,
> >   It might help if I could see your exact code.
> 
> 
> >> Today I tried to average three of these things, and it
> >> just doesn't work.  The indicators (based on the RSI)
> >> give the expected wiggly lines.  Add them up, and divide
> >> by three, and what I get is a constant, a nice, straight
> >> line!  In fact, simply adding them up produces a constant
> >> -85.  Using the Add() function unstead of a simple plus
> >> produces the same thing -- not that I doubted it would.
> 
> 
> I didn't bother including them, because I suspect this is a
> general problem.  However, the indicators I was playing with
> this time were simple %B of the RSI.  To use pseudo-code:
> 
> 100 * (RSI - BollingerBandBottom) / (BBTop - BBBottom).
> 
> All I wanted to do was:
> 
> (%B1 + %B2 + %B3) / 3, where the period of the RSI and
> the Bollinger band length varied from one %B to the next.
> It seemed little enough to ask.
> 
> What came out was a straight line, which was outside the
> range of %B values I was trying to average.  I tried varying
> PerN and BBLenN, without effect.  Even the value of the
> constant output remained the same.
> 
> The same thing happened the other day when I was playing 
> with combining several different oscillators in the same way.
> Eventually, I stopped editing that indicator and set up another
> in which to play with the various factors that entered into the
> equation.  That time it worked, with no obvious explanation,
> as I hadn't done anything different.  Unfortunately, I don't even
> remember which oscillators were involved.  It wasn't anything
> serious, just a way of clearing my mind when overburdened
> with other work.
> 
> I appreciate whatever help anyone can offer.
> 
> Thanks again.
> 
> Owen Davies
>