[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

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

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

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 Links
> 
> 
> 
> 
> 
> 
> 
> 


-- 
Cheers
Graham
AB-Write >< Professional AFL Writing Service
Yes, I write AFL code to your requirements
http://e-wire.net.au/~eb_kavan/ab_write.htm


------------------------ Yahoo! Groups Sponsor --------------------~--> 
<font face=arial size=-1><a href="http://us.ard.yahoo.com/SIG=12h348ib8/M=362131.6882500.7825259.1493532/D=groups/S=1705632198:TM/Y=YAHOO/EXP=1124855846/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/