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

Re: [amibroker] my code is in error I guess



PureBytes Links

Trading Reference Links

Hi Graham,

Wednesday, August 24, 2005, 10:57:24 AM, you wrote:

Copied directly from the chart file:

BBPS = (BBandTop(C,20,2) - BBandBot(C,20,2) / Close) * 100;

G> was this a type error?
G> BBPS = (BBandTop(C,20,2) - BBandBot(C,20,2) / Close) * 100

So I guess this one below was a typo:

G> BBPS =((BBandTop(C,20,2) - BBandBot(C,20,2) ) / Close * 100

Any ideas?  (I like to put parentheses even where not absolutely
needed, to help me see the logic . . . of my illogicality.)  ^_^

Yuki

G> On 8/24/05, Yuki Taga <yukitaga@xxxxxxxxxxxxx> wrote:
>> Simple enough to get some information in a title that I'd like to
>> see:  BBand width expressed as a percentage of the closing price.
>> 
>> I do it this way:  ...+WriteVal(((BBandTop(C,20,2) -
>> BBandBot(C,20,2)) / Close) * 100, 1.2)+ " % of Close"...
>> 
>> Works just fine of course.
>> 
>> My problem is also getting the 50-day moving average of this
>> percentage in there, as well.  I have tried it 2 ways: 1) by
>> longhand, and 2) by declaring a variable BBPS = (BBandTop(C,20,2) -
>> BBandBot(C,20,2) / Close) * 100; and then asking WriteVal for
>> MA(BBPS,50).
>> 
>> Both attempts to get the 50-day MA return the same values, but the
>> values are absurdly large -- in the six figures.
>> 
>> I suppose I am making an absurdly simple error?
>> 
>> Yuki
>> 
>> 
>> 
>> 
>> 
>> Please note that this group is for discussion between users only.
>> 
>> To get support from AmiBroker please send an e-mail directly to
>> SUPPORT {at} amibroker.com
>> 
>> For other support material please check also:
>> http://www.amibroker.com/support.html




------------------------ Yahoo! Groups Sponsor --------------------~--> 
<font face=arial size=-1><a href="http://us.ard.yahoo.com/SIG=12he3q4t8/M=362131.6882500.7825259.1493532/D=groups/S=1705632198:TM/Y=YAHOO/EXP=1124862548/A=2889190/R=0/SIG=10r90krvo/*http://www.thebeehive.org
">Put more honey in your pocket. (money matters made easy) Welcome to the Sweet Life - brought to you by One Economy</a>.</font>
--------------------------------------------------------------------~-> 

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.html

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/