Rule Wizard: VIX is X% above its 10 day SMA
Author: hasenhas
Creation Date: 12/15/2011 10:42 AM
profile picture

hasenhas

#1
Is it possible to solve the following problem with the software: I'd like to go short, when the VIX is 10% or X% above its 10 day SMA? Ich habe nur die Möglichkeit gefunden zu sagen, die externe Datenserie (^VIX eingesetzt) ist größer oder kleiner als ein Fixwert. Thanks
profile picture

Eugene

#2
In the wizard, no. In a code-based strategy, of course.
profile picture

Eugene

#3
Stumbled onto this old thread. It has become possible to achieve in Rule-based Strategies as easy as in code-based. The group is "Moving Average Envelopes", the condition is called "Price is above upper Moving Average Envelope". Topic starter would need to set "Envelope Percent" to 10% and "MA Period" to 10. Voila.

If dealing with VIX as external symbol then it would require some editing of Wizard-generated code, though.
profile picture

mgreco19

#4
Looking to do something similar to this. If vix is above its 200 sma then buy spy. I didn't see how I could do this using the rule-based strategies and I was looking at ActiveTrader 2010-10 | Market-neutral VIX-based pair strategy since it appears to do something similar but it's returning: Invalid Benchmark Buy and Hold Symbol: ^VIX. Could you help me with the code?
profile picture

Eugene

#5
QUOTE:
If vix is above its 200 sma then buy spy. I didn't see how I could do this using the rule-based strategies

You can easily achieve it with Rules using our Community.Rules library. To install it, log in to the Wiki and see "Installation Note". There's no need to restart WLP after installing the file. Just create a new strategy from Rules to see new groups of rules.

The rule is:

External Symbol
** External Symbol Price is above (below) its Moving Average

profile picture

Eugene

#6
And here's how to set it up:

profile picture

mgreco19

#7
I've followed the installation instructions and unblocked and unzipped to the rules folder and am only seeing the 8 conditions I saw previously. Did I unzip incorrectly?
profile picture

Eugene

#8
Please look more closely. You unzipped the source code of Community Indicators. The correct link is in your own ticket:

http://www2.wealth-lab.com/WL5WIKI/CommunityRules.ashx
profile picture

up1andout

#9
Anyone,

I have viewed the training videos and searched the Forum, but still cannot find a coding example to use in creating a rule to perform the following;


* the daily VIX close yesterday is >= 1.05 * the 10 day simple moving average of the VIX close price as of yesterday (no offset)

Can anyone provide an example set of code that I can reference to create this rule?

Thanks.
profile picture

Eugene

#10
You've come to the right place. Log in to the Wiki, install C.Rules and read posts #5 and #6 above.
profile picture

up1andout

#11
Thank you Eugene.

As you instructed, I previously installed the C.Rules xml file, and can see the additional rules in my WLP, which provide the Condition in #6 above - I can see it! However, I need to convert it to code and make modifications for the "greater than 1.05" part of my strategy <== this is what I need help with at this point. If anyone will provide a pdf, video, example, etc on where to make this modification in the code, I would be most appreciative.
profile picture

Eugene

#12
Keith, I see it now.

Click "Open code in new Strategy window", find a line(s) which looks like this...

CODE:
Please log in to see this code.


...and modify it as follows:

CODE:
Please log in to see this code.


Let me know if further assistance is required.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).