Click here to Login





                                                   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
Choose function
Conditional Trailing Stop Exit 2013-10-18
Portfolio vs Stock Return
Currency Mgmt v 0.9
Optimizable Fibonacci Long and Short Trading System

How-to Lessons
How to optimize an indicator in your trading system
How to copy a trading item
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

Related Forum Threads
Simulator question
Access the equity value of the portfolio from the simulator
Ranking System Manager and Simulator yield very different results
Simulator symbols
Create a Metric in Simulator Report

Blog Posts
3 ways to rank stocks in a trading system - Simulator and Potfoli...
QuantShare - review by the Stock Trading Software Reviews
How to Backtest Each Stock or Asset Individually
10 masks to create thousands of rules to use into your trading sy...
Trading Forex with the commitments of traders report









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.