Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Registered User Joined: 3/22/2010 Posts: 14
|
Bruce can you pls help me code the Connors VIX Reversal III:
vix moves 10% or more below its 10day moving average
vix reverses intraday and closes above open
exit 4 days later
thank you in advance,
sg
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
The Personal Criteria Formula Language does not have syntax for referencing other symbols. If I'm understanding your requirements correctly, you would need to specifially check the results of the Condition Formula for the VIX--X symbol.
The close above the open part is straightforward:
C > O
The moves 10% or more below its 10 day moving average depends on how you want to define "moves".
If this needs to be true for at least some part of the day, you would need to use the low:
L <= .9 * AVGC10 AND C > O
If this needs to be true for the entire day, you would need to use the high:
H <= .9 * AVGC10 AND C > O
If this needs to be true at the close, the formula would be:
C <= .9 * AVGC10 AND C > O
You could check for your entry requirements to have been true 4-bars previously to check for your exit after four bars, but there is no guarantee that the entry requirements were not true for more than one day in a row. Doing this for the version using the high would result in:
H4 <= .9 * AVGC10.4 AND C4 > O4
Changes to the other formulas would follow the same pattern.
Personal Criteria Formula Conditions
PCF Formula Descriptions
Handy PCF example formulas to help you learn the syntax of PCFs!
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 3/22/2010 Posts: 14
|
Thanks Bruce.
It's the HIGH of the day that needs to be below the 10d MA.
Instead of a 4 day exit let's use a close above yesterday's 10d MA.
Buy signals are reversed:
low of the VIX must be above 10d MA
C> 10d MA
Exit on close the day VIX trades below yesterday's 10d MA (mean reversion).
Is the best way to plot this as a "show dot" in a column?
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
A Condition Formula for the close being above the 10-Period Simple Moving Average of the previous bar could be written as:
C > AVGC10.1
A Condition Formula for the low being at least 10% above the 10-Period Simple Moving Average could be written as:
L >= 1.1 * AVGC10
If you also need the close to be below the open this would be:
L >= 1.1 * AVGC10 AND C < O
A Condition Formula for the close being below the 10-Period Simple Movin gAverage of the previous bar could be written as:
C < AVGC10.1
You could use these Condition Formulas as WatchList Columns and Sorts.
Setting Up WatchList Columns
Sort with Criteria from the Library
Sort Using Indicators on the Chart
As EasyScan Conditions
EasyScan Basics
EasyScan Expanded
Or even as Custom PCF % True Indicators. It is entirely up to you.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 3/22/2010 Posts: 14
|
Thanks I got it working. One last question...is there a way to see where the condition was true in the past? In tradestation I would use a paintbar or a "dot on close" plotted right on the chart of VIX...
Right now I have a column with a condition and a "dot" if positive. I also used PPO set to 1,10 for a rough idea...thx in advance.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Use the Condition Formula as a Boolean Formula in a Custom PCF % True Indicator.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 3/22/2010 Posts: 14
|
Thanks. It wasn't showing the same as Tradestation so I went back and re-read the rules. If anyone else cares it should be:
C > AVGC10.1 *1.1 AND L >= AVGC10 AND C < O
This is a modified CVRIII as per Dave Landry.
|
|
Registered User Joined: 3/22/2010 Posts: 14
|
Here is the SELL code:
C < AVGC10.1 *.9 AND H <= AVGC10 AND C > O
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You're welcome.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Guest-1 |