Click here to Login

Trading Software Trading objects Features How-to Blog Search


                                                   Creating Watchlist with Two Timeframes

  0

0
Mark
2010-11-14 06:22:45


I was looking to create a dynamic watchlist with the following condition:

Close is below the 20 period SMA on 60 Minutes Bar
and
Close is Above the 20 period SMA on 5 Minutes Bar

As you will notice, two time frames are involved in a single criteria.

Thanks for your help.

Regards,

Mark



QuantShare
2010-11-15 06:12:22

  0

Best Answer
To perform this, create your dynamic watchlist, choose the lower time-frame (5 minutes) then add the following formula:

var1 = close > sma(20);
tf = 60*60; // 1-hour in seconds
var2 = TimeframeApply(tf, close < sma(20));
filter = var1 AND var2;



Mark
2010-11-15 06:46:39

  0

Wow Excellent. I will try it now. Thanks a lot.


Mark
2010-11-15 06:51:56

  0

Perfect. Works beautifully. Thank you very much.


chaz
2011-11-16 10:49:18

  0

Will it work in TradingSystem Strategy to have 30m timeframe for Buy rules & 5min timeframe for Sell rules?

Regards,
Chaz



QuantShare
2011-11-16 13:15:26

  0

If you want to backtest this rule then you should decompress the time-series to synchronize dates. You can plot it on a chart to see the difference.

var1 = close > sma(20);
tf = 60*60; // 1-hour in seconds
var2 = TimeframeApply(tf, close < sma(20));
var2 = TimeframeDeCompress(var2);




No more messages
0




Reply:

No html code. URLs turn into links automatically.

Type in the trading objects you want to include: - Add Objects
To add a trading object in your message, type in the object name, select it and then click on "Add Objects"










QuantShare

Trading Items
Design and backtest a trading system with two strategies
Trading Rules to use with the Trading System Optimizer
Rebalance & Combine & backtest two trading strategies
Fibonacci Trading with the Retracement Levels/Ratios
Long Term Up Trend with Short term re-entery Signals

How-to Lessons
How to speed up watchlist and screener plug-ins when working with...
How to run a screen or a watchlist from a script
Difference between the watchlist and the screener tools
How to drag & drop a stock to a static watchlist
How to plot two different time frames in the same chart

Related Forum Threads
Use Watchlist with Simulator
Browse a watchlist or filter
DISCREPANCIES IN SCREENING BY SCREENER AND SCREENING THRU WATCHLI...
How to create a watchlist of scrips that are in an intermediate u...
green Browse Arrows in watchlist

Blog Posts
Creating a download item: Initial Jobless Claims
How scripts communicate with each other
Technical Analysis Using Multiple Timeframes
Compare stocks and securities by creating a relative performance ...
Working with the formula editor









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 © 2012 QuantShare.com
Social Media
Follow us on Facebook
Twitter Follow us on Twitter
Google+
Follow us on Google+
RSS Trading Items