Click here to Login





                                                   Buy conditioned by second ticker

  0

0
Peter Gum
2010-11-07 16:18:04


Whether a buy is triggered depends on whether QQQQ closes higher the same day than 2 days ago. I am not getting expected results with this code:
Rule1 = rsi(11)>80;
a=Ticker1("qqqq",3,close,LastData);
ra = a > ref(a,2);
buy = (Rule1 && ra);

My guess is I don't understand Ticker1 (or Ticker). Are the dates synchronized? What should I be using?
Thanks.
Pete



QuantShare
2010-11-08 04:37:05

  0

Best Answer
Ticker and Ticker1 are the same. The only difference is that Ticker1 allows you to specify a different timeframe.
In the example you provided me, you have set "3 days" as timeframe.
You should write instead:
Ticker1("qqqq",1,close,LastData)
OR
Ticker("qqqq",close,LastData);

The best way to see how functions work is to plot them on a chart.



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
Buy & Hold of SPY or any Other Index/ETF on Profitable Months
Buy Sell Simulation Indicator
LSS Pivotal Buy and Sell Numbers - Trend Reaction
Ticker Symbols List of the National Stock Exchange, NSE, India
Ticker Symbol Index

How-to Lessons
How to quickly add a ticker symbol
How to rename a ticker symbol
How to screen for stocks having a high correlation with the Dow J...
How to import your own list of stocks/symbols
How to plot the ratio of two stocks

Related Forum Threads
guru The ticker symbol for
Random buy
Backtest, if number of buy is more than open positions, how QS se...
Buy stop at high
Continues Buy / Sell

Blog Posts
Different Ticker Symbols for Each Data Source
Update Chart Layout based on Active Ticker Symbol
Trading System: Moving average crossover and few others buy and s...
How to create buy and sell trading rules based on News Data
How to get buy and sell orders for a portfolio based on a trading...









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.