External symbol Moving Average Rule
Author: xramx
Creation Date: 5/9/2011 10:32 AM
profile picture

xramx

#1
Is there a way to create a RULE which would set a condition that a major market indices is above its SMA? Example, I have a strategy which analyzes sector ETFs. In my back test, I would like to avoid buying during periods when the SPY is below its 50 day SMA. The External Symbol conditions seemed a likely candidate, but it does not provide any Moving Average variations.

I have run the strategy, copied the trades to Excel, then added a column with a 1 or 0 based on the SPY 50 day SMA (using XLQ). This is useful for some basic calculations, but does not provide all the wonderful stuff WLP does.

If there is a way of creating a rule like above, I'd sure appreciate any help in point me to it. If not, it would also be helpful for me just to know it's not there.

ram

profile picture

Eugene

#2
It's not there. But a rule like that would be 1) pretty useful, extending the capabilities of the rule wizard further and 2) pretty easy to develop.
profile picture

Cone

#3
That would be a good addition for the External Symbol Rules group. I'll make a concerted effort to start a "Requested.Rules" file that you can drop into your installation folder and will be seamlessly integrated. Later we'll see if it makes sense to add these to the main installation. Please create a Support Ticket to give me a reminder to start this.
profile picture

tradercn

#4
was it done? I am looking for a similar rule to build my strategy. Tx.
profile picture

Cone

#5
Indeed it was. Customers can download and add the Community.Rules from the Wiki site.
profile picture

tradercn

#6
I realize the rules files is an xml file. I want to create a rules file regarding gaps, how can I create it? Do you have any guide for that?
Besides, I am thinking about the trendline angle. Is that possible to create a trend line through rules rather than codes?
Thanks.
profile picture

Cone

#7
Creating rules, even with a formatting tool, is much more complicated than actually writing the rules yourself in code. That was probably the reason no one use the tool that we provided in 4x!

QUOTE:
possible to create a trend line through rules rather than codes
Sure it's possible, just about anything is possible. The problem is identifying a trend line, determining when it is no longer valid, or acting on when it is breached (as opposed to creating a newly-drawn line). Using it in historical trading rules can be an involved task.
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).