Click here to Login

Trading Software Trading objects Features How-to Blog Search


                                                   Simulator

  0

0
Brian
2011-06-15 22:17:33


if I am running a simulation choosing from all US stocks, is there a way to ask something about another stock or the market as a whole.

For example, if the base script is to buy when the rsi is < 20. Can I make the buy criteria rsi < 20 and rsi (SPY) < 20, (where SPY is the general market).

Basically, instead of using "Rsi(5) " I would like to hard code in the symbol as "Rsi(SPY, 5)". I'm assuming I use the GetSeries function but not sure.

If I can do this, please provide an example.

Thank you



QuantShare
2011-06-16 05:37:39

  0

Best Answer
One way to do this is to use the "GetSeries" function.

Example:
spy = GetSeries("SPY", close);
buy = rsi(5) < 20 and rsi(spy, 5) < 20;



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
Output metric for each trading year
Stop Loss for the N-first Trading Bars only
Combination Element from Lexicographical Index
Capital Allocation based on the Expected Market Volatility (VIX)
Derivative Moving Average Strategy

How-to Lessons
How to create a formula
How to optimize the stop limit of a trading system
How to add a metric in the trading system simulation report
How to plot arrows below/above candlesticks on a chart
How to import trading data from CSV files

Related Forum Threads
Simulator question
How does Simulator work?
Simulator Question
Simulator Trading System Report
Simulator - Activate stop immediately

Blog Posts
3 ways to rank stocks in a trading system - Simulator and Potfoli...
True portfolio simulation applied to trading systems
Basic trading system implemented using the money management tool
Select the best ETFs combination to maximize your return and redu...
Trading software new features









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