[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

Yuki there are a couple of things I do when using multiple sets of
brackets. Either break each bracket set to different lines, or copy
the code into a text editor that highlights the matching bracket when
you sit cursor on one
using the error one
Breaking it out into easy function sets, and keeping mulitply and
divide with the other variable as these are done first. It helps to
see if something is on the wrong place
BBPS =
 (  
  BBandTop(  C,20,2  ) -
 BBandBot(  C,20,2  )  / Close 
 ) * 100

the corrected line would be

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


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



On 8/24/05, Yuki Taga <yukitaga@xxxxxxxxxxxxx> wrote:
> Hi Graham,
> 
> Wednesday, August 24, 2005, 7:07:25 PM, you wrote:
> 
> G> sorry yuki
> G> In correcting what looked like a typing error I did one myself
> G> The line you had shown had a bracket in worng place which would give
> G> you wrong results. The bracket was shown after Close, but I think it
> G> shoul have been before the dividing sign /
> G> BBPS = (BBandTop(C,20,2) - BBandBot(C,20,2) / Close) * 100
> G> I changed it but added in a bracket too many, here is my corrected line
> G> BBPS = ( BBandTop(C,20,2) - BBandBot(C,20,2) ) / Close * 100
> 
> No need to apologize of course.  And the corrected line does just
> what I want.
> 
> What I *really* want, however, is to be able to figure this stuff out
> for myself. Alas, my brain works in some ways (I made a small fortune
> with NEC yesterday, only intraday), but not in others (I cannot see
> what is probably an obvious programming error).
> 
> Thanks,
> 
> Yuki
> 
> P.S. Jesse Livermore was absolutely correct: (I paraphrase) Many
> people are good at action, but not many are good at waiting, and
> waiting is where the money is.  (I think he actually wrote "sitting",
> but I'm too tired to look it up.)  I would only add that waiting, and
> then recognizing when it is time to suddenly grossly overact, is
> really an important thing, too.  ^_^  There is a time to risk a *lot*
> more than normal.  It is not very often, and if you do it very often,
> you will get burned. But there is a time when it is absolutely called
> for. Otherwise, one should buy an index fund.  (I made no trades
> today, so I had time to test lots of new programming errors.)  ^_-
> 
> 
> 
> 
> 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
> 
> 
> 
> 
> 
> 
> 
>


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