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

[EquisMetaStock Group] Amibroker issues (was v8 System Tester Issues and how to fix)


  • To: <equismetastock@xxxxxxxxxxxxxxx>
  • Subject: [EquisMetaStock Group] Amibroker issues (was v8 System Tester Issues and how to fix)
  • From: "SR" <raftsp@xxxxxxxxx>
  • Date: Fri, 16 May 2003 03:50:09 -0700
  • In-reply-to: <1053070440.1520.99121.m12@xxxxxxxxxxxxxxx>

PureBytes Links

Trading Reference Links

Thanks to all for participating in the conversation.
I have already posted the questions to AB group and have received 2 answers
by Janeczko. Since my problems and the corresponding queries concern mainly
AB users, I suggest we continue on AB board unless other MS users from this
group express their interest in this thread; I think that so far it might be
useful, but it is getting too detailed.

I tried java because according to Janeczko, writing functions at AFL level
is possible with beta versions only; and as Chuck noted I don't have access
to betas since I am a trial user. Janeczko said that the new
v.4.40 in late June will incorporate AFL level functions. I will be patient.

Unfortunately I keep receiving errors, with the java version too,
no matter what I do. I have deleted both functions (the called and the
calling)
and I have re-created them from scratch. I have been careful with the
spelling
with names consistency, I think I have done just about everything:
It doesn't want to work. I get error messages all the time, but what is
more strange is that sometimes I get different error messages for the same
version,
or more than one (obviously each referring to a different module).
My last attempt resulted in these messages:

Source: Microsoft JScript runtime error
Line:   4   Char:   1
Error:  0  - Number expected

..and just after accepting my ... destiny a new one:

Method/function 'myFunction' call failed at line 3, column 86:


Graph0 = script.myFunction(O,H,L,C)
----------------------------------^

Anyway. In a few hours I will go back to AB board and post my next questions
(regarding also simultaneous arrows on the same bar despite the excluding
setting,
equity drops in dead trading zones and maybe some more).
I would be very helpful if any of you continued to participate in the
conversation.

Thanks again

Spyros




_______________________________________________________________________
________________________________________________________________________

Message: 17
   Date: Thu, 15 May 2003 23:15:25 -0700
   From: "CS" <res1wgwl@xxxxxxxxxxx>
Subject: Re: v8 System Tester Issues and how to fix. (for SR)

OK...I see now.
I like your version better since it moves more code to the saved afl file
and eliminates the requirement of declaring the function in all the formulas
that use it.
I got high-centered on the #include part. Couldn't see how you could make it
work without it.

-CS
  ----- Original Message -----
  From: Chuck Rademacher
  To: equismetastock@xxxxxxxxxxxxxxx
  Sent: Thursday, May 15, 2003 6:42 PM
  Subject: RE: [EquisMetaStock Group] v8 System Tester Issues and how to
fix. (for SR)


  The original post mentioned that Spryos already had the #include in his
code (see below), so I didn't repeat that bit.   His (original) problem was
more to do with version number than a syntax problem.   He would need a
fairly recent beta (4.33?) to be able to use functions this way.    Since he
mentioned that he is a demo user, he is unlikely to be using a beta version.


    -----Original Message-----
    From: CS [mailto:res1wgwl@xxxxxxxxxxx]
    Sent: Thursday, May 15, 2003 9:27 PM
    To: equismetastock@xxxxxxxxxxxxxxx
    Subject: Re: [EquisMetaStock Group] v8 System Tester Issues and how to
fix. (for SR)


    So what part do you disagree with?
    You used #include in the formula that called it, right?

    Without #include it won't work on my machine.

    -CS
      ----- Original Message -----
      From: Anthony Faragasso
      To: equismetastock@xxxxxxxxxxxxxxx
      Sent: Thursday, May 15, 2003 5:42 PM
      Subject: Re: [EquisMetaStock Group] v8 System Tester Issues and how to
fix. (for SR)


      CS...sorry to disagree with you....

      I created a function...as Chuck stated ..in an empty IB window:

      function myFunction(x1,x2,x3,x4)
      {
      return (x1 + x2 + x3 + x4) / 4;
      }

      Saved this as myfunction.afl

      Then in an empty IB window I put the following:

      #include "C:\Program files\Amibroker\Afl\myFunction.afl"

      x = myFunction(Open, High, Low, Close);

      Plot(X,"",colorRed,styleLine);

      It worked.....

      Anthony

      -------Original Message-------

      From: equismetastock@xxxxxxxxxxxxxxx
      Date: Thursday, May 15, 2003 7:13:16 PM
      To: equismetastock@xxxxxxxxxxxxxxx
      Subject: Re: [EquisMetaStock Group] v8 System Tester Issues and how to
fix.
      (for SR)

      Please excuse me for cutting in...

      I haven't been able to get Chuck's solution to access a function
within the
      separate AFL directory either, until I used:

      Saved within C:\Program files\Amibroker\Afl\myFunction.afl
      return (x1 + x2 + x3 + x4) / 4;

      That's it. Just one line. No brackets.
      Now, within Indicator Builder, my formula is:

      function myFunction( x1, x2, x3, x4 )
      {
      #include "C:\Program files\Amibroker\Afl\myFunction.afl"
      }

      A2=myFunction( O, H, L, C );
      Plot( A2,"function example", colorRed );

      Hit APPLY and it should work (with ver 4.36).
      I had to insert the #include instruction since it doesn't appear that
AB
      function commands will search the hard drive for the saved afl file by
      simply stating
      x = myFunction(Open, High, Low, Close);

      AB will search for the called function within Indicator Builder, but
it
      doesn't appear to out on the hard drive.

      -CS


      ----- Original Message -----
      From: "Chuck Rademacher" <chuck_rademacher@xxxxxxxxxx>
      To: <equismetastock@xxxxxxxxxxxxxxx>
      Sent: Thursday, May 15, 2003 12:45 PM
      Subject: [EquisMetaStock Group] v8 System Tester Issues and how to
fix. (for
      SR)


      > I don't know why you are using java script for your function.
      >
      > Try putting this into a file caled myFunction.afl:
      >
      > function myFunction(x1,x2,x3,x4)
      > {
      > return (x1 + x2 + x3 + x4) / 4;
      > }
      >
      >
      > Then, in your "main" AFL, say:
      >
      >
      > x = myFunction(Open, High, Low, Close);
      >
      >
      > It will work just about every time...
      >
      >
      > > -----Original Message-----
      > > From: SR [mailto:raftsp@xxxxxxxxx]
      > > Sent: Thursday, May 15, 2003 6:28 AM
      > > To: equismetastock@xxxxxxxxxxxxxxx
      > > Subject: [EquisMetaStock Group] RE:RE: v8 System Tester Issues and
how
      > > to fix.
      > >
      > >
      > >
      > > Anthony,
      > >
      > > I want to be able to create a function that will return a number
      > > to another
      > > function that calls the first one. It doesn't really matter what
      myFuction
      > > returns exactly. For simplicity, suppose that what I want to  get
is
      > > (O+H+L+C)/4. I do know that this is so simple that it doesn't need
to be
      a
      > > separate function, but let's accept that this is what we want to
do.
      > > Actually I had problems with this one too!
      > > Although I have never used java sript before, I thought I could
      > > make such a
      > > simple script by just reading the examples given. So, this is what
I
      did:
      > > First I created a function named "myFunction" like this:
      > >
      > > EnableScript("jscript");
      > > <%
      > > function myFunction(x1,x2,x3,x4)
      > > {
      > > return (x1 + x2 + x3 + x4) / 4;
      > > }
      > > %>
      > >
      > > I saved it in C:\Program files\Amibroker\Afl
      > > Please notice that I have checked that a function called
      > > "myFunction" exists
      > > there indeed!
      > >
      > > Then I tried the calling formula:
      > >
      > > #include "C:\Program files\Amibroker\Afl\myFunction.afl";
      > > script = GetScriptObject();
      > > Graph0 = script.myFunction(Open,High,Low,Close);
      > >
      > > The problem is that each time I click 'Apply' I get this error:
      > >
      > > Method/function 'myFunction' does not exist at line 3, column 96:
      > >
      > >
      > > Graph0 = script.myFunction(Open,High,Low,Close)
      > > ----------------------------------------------^
      > >
      > > 1. I don't understand. I do see "line 3", but where is "column 96"
in
      the
      > > above code?
      > > 2. "doesn't exist"?! But I do see it! So, what is the mistake I
      > > have made in
      > > the above formulas?
      > > 3. The program freezes all the time and I have to shut it down and
      re-run
      > > it.
      > > 4. This is not all. So far I have not managed to get a
"Points-Only"
      test,
      > > according to the instructions given. The tester keeps buying and
selling
      > > dozens of shares or contracts depending on the equity, regardless
      > > of what I
      > > have written in the code.
      > > 5. Sometimes I get rubbish on the main chart.
      > >
      > > Maybe I have to re-install the program; maybe it is the RT
(eSignal)
      > > version..??
      > > Is it the "demo"? Who knows..
      > > So, in case you can help with some of the above, I will be very
much
      > > obliged.
      > > I will also try once more with the AB board, later.
      > >
      > > Thanks
      > >
      > > Spyros
      > >
      > >
________________________________________________________________________
      > >
________________________________________________________________________
      > >
      > > Message: 6
      > >    Date: Wed, 14 May 2003 15:28:57 -0400 (Eastern Daylight Time)
      > >    From: "Anthony Faragasso" <ajf1111@xxxxxxxx>
      > > Subject: Re: RE:RE: RE: v8 System Tester Issues and how to fix.
      > >
      > > Spyros,
      > >
      > > If you want to give an example of what you are trying to do...then
a
      more
      > > helpful solution
      > > can be given...
      > >
      > > Anthony
      > >
      > > -------Original Message-------
      > >
      > > From: equismetastock@xxxxxxxxxxxxxxx
      > > Date: Wednesday, May 14, 2003 10:07:13 AM
      > > To: equismetastock@xxxxxxxxxxxxxxx
      > > Subject: [EquisMetaStock Group] RE:RE: RE: v8 System Tester Issues
and
      how
      > > to fix.
      > >
      > > Anthony and Kevin and Chuck thank you for your replies.
      > >
      > > Chuck:
      > >
      > > 1. Obviously
      > > myVar = myFormula()
      > > is not enough because it doesn't work [although I am trying with
version
      > > 4.30 (the latest?)]
      > > I wouldn't mind to have to write a couple of lines including
#include
      > > directives etc. as
      > > Anthony suggests (in fact, I had already tried that several times
in the
      > > past) but I usually get errors.
      > > That's why I keep asking and trying. I have already read
Janeczko's java
      > > script and VB examples
      > > and a few messages on the AB board. Sometimes the #include
solution
      works,
      > > other times
      > > it does not. I get unexpected and inexplicable errors.
      > >
      > > 2. I asked on this board because the AB conversation was brought
to this
      > > board (not by me anyway).
      > > BTW my opinion is that such conversations are not exactly off
      > > topic because
      > > I guess that the
      > > members of this group are much more than just MS users. Some of
them
      have
      > > already tried
      > > other software (AB included), some have already asked questions
about
      such
      > > software and most
      > > of us would like to have some elementary information about ... the
rest
      of
      > > the world.
      > >
      > > 3. As I said, in the past I had directly asked Janeczko about
      > > these problems
      > > but I got no answer.
      > > Yes, he had rapidly replied to my first message, but as the
problem
      > > persisted, I had to ask again.
      > > This time he did not reply. A few days ago I searched the AB
database
      for
      > > relevant messages.
      > > I found I few, among which some replies by Janeczko. I must say
that
      they
      > > were not very encouraging.
      > > So, my impression so far is that neither AB programming nor the
      > > communication is free of problems.
      > >
      > > Please don't missunderstand me. I still believe that AmiBroker is
an
      > > excellent program. And as far as
      > > programming is concerned it is much more powerful than Metastock,
      > > which for
      > > different reasons
      > > is also an excellent program. I am just saying that both programs
      > > have their
      > > cons and unless
      > > the function-calling problem is solved for good, this IMO will be
      > > a major AB
      > > drawback.
      > >
      > > Anyway I will make a new attempt with the AB group.
      > > Thanks again
      > > Spyros
      > >
      > >
      > >
      > > Message: 16
      > >    Date: Tue, 13 May 2003 20:19:24 -0400
      > >    From: "Chuck Rademacher" <chuck_rademacher@xxxxxxxxxx>
      > > Subject: RE: RE: v8 System Tester Issues and how to fix.
      > >
      > > It's even easier in AFL.   Just say:
      > >
      > >       myVar = myFormula();
      > >
      > > Even better than MS, AFL will let you pass values to the "other"
      > > formula as
      > > with this example:
      > >
      > >       myVar = myFormula(Open*1.1);
      > >
      > > A lot of people are willing to help with AB/AFL questions, but
      > > feel awkward
      > > answering them on this board.   If you ask questions like this on
the AB
      > > board, you will get a quick reply.  In fact, you will get dozens
      > > of replies.
      > >
      > > > -----Original Message-----
      > > > From: SR [mailto:raftsp@xxxxxxxxx]
      > > > Sent: Tuesday, May 13, 2003 6:33 AM
      > > > To: equismetastock@xxxxxxxxxxxxxxx
      > > > Subject: [EquisMetaStock Group] RE: v8 System Tester Issues and
how to
      > > > fix.
      > > >
      > > >
      > > >
      > > > Kevin,
      > > >
      > > > Let me add a question about AmiBroker.
      > > > What I want to do is very simple: have a formula call another
      > > formula the
      > > > way we do in MS:
      > > >
      > > > myVar:= fml("myFormula");
      > > >
      > > > Can this be done with AFL? If yes, then how? Could you provide
the AB
      > > > equivalent?
      > > >
      > > > Whenever I ask this question I get no answer! I have asked a
      > > couple of AB
      > > > users privately, I have asked
      > > > publicly, I have asked Tomasz Janeczko. No positive replies no
      negative
      > > > ones! Nothing! Very strange, isn't it?
      > > >
      > > > So I hope you will be kind enough to post a reply.
      > > > Thank you in advance.
      > > >
      > > > Spyros
      > >
      > >
      > >
      > >
      > >
      > >
      > > Yahoo! Groups Sponsor
      > >
      > >
      > >
      > >
      > >
      > > To unsubscribe from this group, send an email to:
      > > equismetastock-unsubscribe@xxxxxxxxxxxxxxx
      > >
      > >
      > >
      > > Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service.
      > >
      > >
      > >
      > >
      > >
________________________________________________________________________
      > >
      > >
      > >
      > > To unsubscribe from this group, send an email to:
      > > equismetastock-unsubscribe@xxxxxxxxxxxxxxx
      > >
      > >
      > >
      > > Your use of Yahoo! Groups is subject to http://docs.yahoo
      com/info/terms/
      > >
      > >
      >
      >
      > ------------------------ Yahoo! Groups
      >
      > To unsubscribe from this group, send an email to:
      > equismetastock-unsubscribe@xxxxxxxxxxxxxxx
      >
      >
      >
      > Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
      >
      >
      Yahoo! Groups Sponsor
      ADVERTISEMENT




      To unsubscribe from this group, send an email to:
      equismetastock-unsubscribe@xxxxxxxxxxxxxxx



      Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.




      To unsubscribe from this group, send an email to:
      equismetastock-unsubscribe@xxxxxxxxxxxxxxx



      Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



    To unsubscribe from this group, send an email to:
    equismetastock-unsubscribe@xxxxxxxxxxxxxxx



    Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.


        Yahoo! Groups Sponsor



  To unsubscribe from this group, send an email to:
  equismetastock-unsubscribe@xxxxxxxxxxxxxxx



  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.


[This message contained attachments]



________________________________________________________________________
________________________________________________________________________



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





------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get A Free Psychic Reading! Your Online Answer To Life's Important Questions.
http://us.click.yahoo.com/Lj3uPC/Me7FAA/uetFAA/BefplB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
equismetastock-unsubscribe@xxxxxxxxxxxxxxx

 

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