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

[amibroker] my code is in error I guess



PureBytes Links

Trading Reference Links

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




------------------------ Yahoo! Groups Sponsor --------------------~--> 
<font face=arial size=-1><a href="http://us.ard.yahoo.com/SIG=12hjjs31j/M=362343.6886682.7839641.1493532/D=groups/S=1705632198:TM/Y=YAHOO/EXP=1124854726/A=2894352/R=0/SIG=11fdoufgv/*http://www.globalgiving.com/cb/cidi/tsun.html";>Help tsunami villages rebuild at GlobalGiving. The real work starts now</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/