Click here to Login








Multiple Time Frames Trading System - Price / Moving Average Crossover

by QuantShare, 4738 days ago
Share |






Here is a strategy I created to show you how to use multiple time frames in a trading system. The system is based on price crossover with its 10-Bar simple moving average. Although, no optimizations at all were done, the trading system has generated an annual return of 26.14%. It has a drawdown of -17.76%, a Sharpe ratio of 1.74, a Sortino ratio of 2.59 and 51.4% of the trades generated a profit (1205 trades). The backtest was based on U.S. Stocks (daily data - 2001-2011).

Trading System:
- Maximum Positions: 10
- Buy at tomorrow open

Here are the different buy rules:
- Liquidity: Price above $2 and the average daily volume in dollars is above $600,000.
- Daily time-frame: Price crosses above its 10-Bar moving average
- Weekly time-frame: Last weekly close price crosses above its 10-Bar moving average
- Monthly time-frame: Last monthly close price crosses above its 10-Bar moving average

Here is the exit/stop rule:
- Trailing stop at 5%

The crossover rule is performed using the "cross" function. To get the weekly crossover, I have used the "TimeframeApply" function. This function changes the current time frame then applies the provided variable/rule. It returns a compressed time-series (This means that the time-series is not adjusted to the current data/dates). The "TimeframeDecompress" adjusts this time-series to the current time frame. The easiest way to see how it works is to display the data on a chart.

Example:

week1 = TimeframeApply(7, close);
week1d = TimeframeDecompress(week1);

plot(week1, "", colorGreen);
plot(week1d, "", colorRed);


Share This ->
Share |


You have to log in to bookmark this object
What is this?




Type: Trading System

Object ID: 960


Country:
All

Market: All

Style:
Technical Analysis

Reviews
You must log in first

Join now
and get instant access for free to the trading software, the Sharing server and the Social network website.
Click here


Related objects

Empty

Number of reviews
Click to add a review
Average rate
Click to rate this item
Number of times this object was downloaded
Number of rates the current object received
Report an object
if you can't run it for example or if it contains errors
Click to report this object

Technical Analysis


Fundamental Analysis



Random Blog Posts

Trading System: Buy Stocks based on their Sharpe Ratio Rank

Creating and managing notes for your stocks

How to Quickly Create Fundamental Scans

Download Trading Data using the Post-Script

Download Trading Data using the Pre-Script

Download Trading Data using the URL-Script

Trading Items: Data Download using .Net Scripts

Adding Trading Indicators and Formulas to a Chart

Show All

Number of reviews
Click to add a review
Average rate
Click to rate this item
Number of times this object was downloaded
Number of rates the current object received
Report an object
if you can't run it for example or if it contains errors
Click to report this object






QuantShare
Product
QuantShare
Features
Create an account
Affiliate Program
Support
Contact Us
Trading Forum
How-to Lessons
Manual
Company
About Us
Privacy
Terms of Use

Copyright © 2024 QuantShare.com
Social Media
Follow us on Facebook
Twitter Follow us on Twitter
Google+
Follow us on Google+
RSS Trading Items



Trading financial instruments, including foreign exchange on margin, carries a high level of risk and is not suitable for all investors. The high degree of leverage can work against you as well as for you. Before deciding to invest in financial instruments or foreign exchange you should carefully consider your investment objectives, level of experience, and risk appetite. The possibility exists that you could sustain a loss of some or all of your initial investment and therefore you should not invest money that you cannot afford to lose. You should be aware of all the risks associated with trading and seek advice from an independent financial advisor if you have any doubts.