Refer to SPY in formulas

Questions directed to our Support Team. Responses can be expected within 24 hours.

Refer to SPY in formulas

Postby marco » Thu Jun 13, 2013 2:48 pm

Let's assume I want to find out whether a strategy gives better results if I do not open positions when SPY has experiencied two or more price swings of more than 1 % in the last 5 days.

I've come up with something like this to add to my entry filter

SUM(ABS(((C - ref(C,-1))/ref(C,-1))*100 > 1),5) < 2

but how do I refer C to the close of SPY?
marco
 
Posts: 52
Joined: Mon May 27, 2013 6:15 pm

Re: Refer to SPY in formulas

Postby Overload » Thu Jun 13, 2013 6:40 pm

I didn't verify your formula, but you can reference another symbol by using the symbol() formula. So your formula would look like this:

symbol(SPY, SUM(ABS(((C - ref(C,-1))/ref(C,-1))*100 > 1),5)) < 2

By you might also want to check out the StrataSearch Volatility Index, or svi(). This is a formula we added on our own, but it seems to match what you're looking for pretty closely. Your formula for the svi would be this:

svi(close, 1, 5) < 2

You can look up the StrataSearch Volatility Index in the help for more information.

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


Return to Technical Support

cron