Using a multiple of a variable in Autosearch

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.

Using a multiple of a variable in Autosearch

Postby rjay » Tue Jun 11, 2013 9:19 am

I have a Primary Autosearch rule as follows:

(high>=high ( high, @days ))

I then want to use the inverse of this rule ((low<=low ( low, @days) but I want to experiment with using a multiple of the @days variable. So for example, the entry string might have generated 20 from the @days variable and I want the exit string to try 2* @days or 0.5 @days (40 and 10 respectively) rather than using a new variable for the exit string which would have a random, unrelated number of days compared to the entry string.

So, I am using this code as the exit string:

(low<=low ( low, (@days * @atrmult)))

Is that correct ? Because when I look at the generated strategies I am seeing things like:
(((low<=low ( low, (80 * 0.5))))

whereas I was expecting it to say (in the above example):

(((low<=low ( low, (40))))
Posts: 116
Joined: Wed Jul 26, 2006 6:51 am

Re: Using a multiple of a variable in Autosearch

Postby Overload » Tue Jun 11, 2013 1:33 pm

Yes, variables are not combined into a single number, but will instead remain separate. If you want "multiples" but only want a single number instead of multiple numbers, you will need to program that into a single variable. In other words, adjust the from/to/by values in a single variable to be the values you want.

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

Return to General Discussion