Can't use Variables in Calculation Builder ?

StrataSearch has many powerful features, with many techniques and approaches to explore. Here we discuss the things we've done, and the things we'd like to do.

Can't use Variables in Calculation Builder ?

Postby rjay » Wed Jun 12, 2013 5:46 am

I often use the Calculation Builder in Entry/Exit String 'Trading Rule Setup' but it's a shame that I can't use variables in the Builder, as everytime I try I get an error of "Undefined variable in Formula: @days" (or whatever the @ name of my variable is). Not sure if this is a bug, but hopefully this part of the formula error-checking can be changed in a future build.
rjay
 
Posts: 116
Joined: Wed Jul 26, 2006 6:51 am

Re: Can't use Variables in Calculation Builder ?

Postby Overload » Wed Jun 12, 2013 2:31 pm

Can you give me an example of what screen you're using, and what you're trying to enter? I believe the Calculation Builder should be allowing the entry of variables, but only on screens where variables are allowed. So, for example, you can't enter variables when launching the Calculation Builder from the Screener, since the Screener doesn't allow the use of variables.

Pete
Overload
 
Posts: 2248
Joined: Wed Nov 30, 2005 12:14 pm

Re: Can't use Variables in Calculation Builder ?

Postby rjay » Thu Jun 13, 2013 5:58 am

I am referring to the Trading Rules in AutoSearch Setup.

So, I 'Add' a rule, 'Add' a variable of '@days', click 'Builder' and try to use one or more of the variables I created but i just get the error of "Undefined variable in Formula: @days".
rjay
 
Posts: 116
Joined: Wed Jul 26, 2006 6:51 am

Re: Can't use Variables in Calculation Builder ?

Postby Overload » Thu Jun 13, 2013 8:12 am

I'm still not able to recreate a problem. In the Trading Rule Setup, I click the Builder button for the Entry String, select Relative Strength Index as the formula, enter @days for the Value, and it enters "rsi(@days)" into the Entry String just fine. Maybe you're using a different formula or variable name?

Just so you know, the Calculation Builder does not actually look at the variables that have been set up. Instead, it is just intended to accept any valid variable name (begins with @ sign, no spaces, etc.).

Pete
Overload
 
Posts: 2248
Joined: Wed Nov 30, 2005 12:14 pm

Re: Can't use Variables in Calculation Builder ?

Postby rjay » Thu Jun 13, 2013 8:26 am

Hmm, yes it works with Relative Strength Index. Strange - maybe it was a specific formula. I don't remember which ones I was using, but I'll let you know which it was if it happens again.
rjay
 
Posts: 116
Joined: Wed Jul 26, 2006 6:51 am

Re: Can't use Variables in Calculation Builder ?

Postby rjay » Mon Jun 17, 2013 8:00 am

Ok, I've narrowed down when it happens, and it seems to be using formulae like CrossAbove/CrossBelow or DaysSinceCrossAbove / DaysSinceCrossBelow. Trying to use an already defined variable in the Value1 or Value2 box for these formula gives an error of "Undefined variable in formula".
rjay
 
Posts: 116
Joined: Wed Jul 26, 2006 6:51 am

Re: Can't use Variables in Calculation Builder ?

Postby Overload » Mon Jun 17, 2013 8:20 am

Okay, I will put those on the list. In the meantime, you will not be able to use variables when entering those formulas with the Calculation Builder. Variables will need to be entered afterwards.

Pete
Overload
 
Posts: 2248
Joined: Wed Nov 30, 2005 12:14 pm


Return to General Discussion