error evaluating equations -- ???

  • Anonymous - 2010-11-28


    I have just installed MOV in Ubuntu 10.04. So far so good, and it looks like I can use this. But I am having quite a problem with the equations in Gondola language. Of the 12 or so equations I copied from the MOV Help manual, (max, min, bol_upper, avg, etc), only the avg equation worked upon application. The rest got flagged with: "error evaluating equations". I have read and re-read, but can't see what I am doing wrong.

    Can someone point out what I am missing? It must be something obvious.

  • Mark Hummel

    Mark Hummel - 2010-11-28


    What functionality were you using? Most of the time, when equations are used in an expression returning a true/false value. The exceptions are Genetic Algorithm and the Artificial Neural Network. Any other time, if you just use the equation, it's not going to make sense. For example, the expression "5+5" doesn't make sense as a buy rule, where as  "5+5 > 9" does.

    You could also be running into other errors like type mismatch or variable evaluation.

    We'll need a little more information to determine what the problem is, or if there's a bug. The manual may also be slightly out of date as well.


  • Anonymous - 2010-11-28

    Thanks for your very prompt response.

    I haven't touched G Algo or ANN, yet. Too early for a beginner like me.

    Here are a few of the equations I set up via File->Preferences->Equations:

       avg(close, 30)         <- this worked when applied as an equation in a table display
       max(high, 5, -1)       <- didn't worked when applied as an equation in a table display
       max(volume, 15, 0)  <- didn't worked when applied as an equation in a table display
       min(volume, 15, -1)  <- didn't worked when applied as an equation in a table display

    I did consider whether I may have generated a type mismatch. But, somehow I don't think so.

    Appreciate your help.


  • Anonymous - 2010-11-28

    Looks like the gondola parser needs a bit more work.

      * The construct below was rejected - flagged with: "expected comma",
         max(high - low,abs(high - lag(close, -1)),abs(low - lag(close, -1)))

        It has all the comma needed, right?

      * The construct below was rejected - flagged with: "expecting quote type",
         max((high-low), abs(high - lag(close, -1)), abs(low - lag(close, -1)))

        Now this makes things a bit awkward.

  • Anonymous - 2010-11-28

    Oops. Sorry about my last comment. I think I misunderstood the gondola - syntax and all. But do you have any suggestions about how one might calculate the average true range with gondola?

  • Mark Hummel

    Mark Hummel - 2010-11-28

    I think in the first example, you're missing a closing bracket for one of the lag functions.

    One of the things on the 'To Do List' is better error handling for Gondola expressions. As the number of terms increases, it becomes non trivial to write valid Gondola expressions. I had to use emacs auto-complete to stop where the missing bracket was :)

    The problem with the other expressions looks like a bug - I've certainly found at least one problem in the code, probably two.

    Thank you finding them.


  • Anonymous - 2010-11-28

    Me again. I know very little java, etc. I'd like to set up MOV 0.722 in Ubuntu 10.04 with a postgresql db. Do I really need to download a jdbc? There seems like an awful lot of jdbcs in my ubuntu already.

    Assuming, I download a new jdbc, where and how do I install it? The reason I am asking you rather than the jdbc guys is because I get the impression that the jdbc is application related? If I'm wrong, kindly point me to some docs that can help me.


  • Anonymous - 2010-11-28


    Sorry. But the number of brackets is correct, as is the case of the number of commas. In both equations.

    Thinking aloud, can we say that (in the absence of a language ref manual) the gondola max function is not the standard arithmetic max function? But a function to extract the max of either one of the OHLC quotes from a time series?

    Not a happy solution either - because we do need a max function; the bread and butter one.


  • Mark Hummel

    Mark Hummel - 2010-11-28

    1.  PostgreSQL - JDBC

    If you're not using venice.jar, (ie you run Venice by doing 'ant run' on the commandline) and you find something like postgresaql-*.*.jar, make the following changes to build.xml in the Venice root directory:

    1. Create a symbol link (ln -s /path/to/postgres.jar) or note the full path
    2. Add a property <property name='lib.postgreSQL' value='${basedir}/link-to-postgresSQL.jar'/> at the top of the build.xml where the other properties are defined.
    3. In the <target name='run'> section, add <pathelement path="${lib.postgres}"> in the classpath element.
    4. Run Venice, and in Preferences->Quote Source, choose PostgreSQL.
    5. Enter the driver name - you should be able to find this on

    I haven't tested this but it should work.

    2. Gondola Paser

    Oops, my mistake - the syntax does seem correct on a closer look. What it could be, (but I can't say for sure without trying) is that because the final argument to max is an offset ( <= 0), wrapping the abs function around the offset means, unless low == lag(close,-1), you'll get an error. That could be what Venice is complaining about.

    I haven't had time to trace through to be certain. I'll post more when I have more information.



Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks