Click here to Login





                                                   Scripting, Parser.Parse, and intraday data

  0

0
Kyra Packens
2017-09-12 00:13:04


Hi,

I have a script that parses a QS formula that I use to export (transformations of) daily data that I've been using happily for quite a while now. The relevant bit is as follows:

// formula and symbolName are defined before this snippet
int timeframe = 1;
ParserTool ptool = new ParserTool();
Parser p = ptool.CreateParser(formula);
Report report = p.Parse(symbolName, timeframe, true);
DateTime[] dates = report.GetDateArray();
// ... and so on

Recently I've gotten some intraday data and wanted to use the same script to export transformations of it. From what I read I thought that I would just change the timeframe to something like -300 (for 5 minute bars) and things would work fine. However, when I set a negative timeframe (for intraday data) the parser behaves as if timeframe == 1. Diiffering daily intervals do work (eg, timeframe = 5 produces weekly data as expected).

I've searched everywhere and can't find any other settings that might need to change for parser to work in intraday mode. What am I missing? I can verify that I do have intraday data for the symbols that I'm working with.


Thank you,
Kyra



QuantShare
2017-09-12 21:49:25

  0

Hi Kyra,

To get intraday data you need to change the third parameter and set "false" instead of "true".



Kyra Packens
2017-09-13 00:29:56

  0

When I set the isHistorical parameter to 'false' I get no output (report.NbQuotes == 0), so unfortunately that isn't working. Let me add some more information that might help troubleshoot:

* I'm trying to run the Script on historical 5 minute quotes that I've previously imported.

* As far as I can tell the Quotes data are fine; they look good in the Database Editor and I can view intraday charts of these symbols and run formulas on those charts with no trouble.

* I can run Simulator reports on intraday timeframes on these symbols with no trouble.

* I do not have have intraday data to match all of my daily data, for example for IBM I have about ten years of of intraday data but over 30 years of daily bars. Also, intraday data for IBM ends prior to the current date, but I have daily data to the current date.

Any ideas?


Thanks,
KP



QuantShare
2017-09-14 09:21:25

  0

Best Answer
Setting the "isHistorical" to false will tell QuantShare to get intraday data instead of EOD data. Make sure you are putting a positive time frame (300) and make sure you are testing a ticker symbol that has intraday data.


Kyra Packens
2017-09-14 15:21:15

  0

Ah, wonderful, that did the trick. I'd tried isHistorical == true with positive and negative timeframes, isHistorical == false with negative timeframes, but somehow managed never to plug in a positive timeframe with isHistorical == false. Of course it makes perfect sense now that you point it out XD

Thank you for the help :)

-- KP



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
5-Minute Historical Intraday Data for Forex, Indices and Futures/...
Brent and Crude Oil Continuous Futures Contracts - Intraday Data
Intraday Historical Data - Alphavantage
Historical Intraday Data for U.S. Stocks
Intraday Data for Major Stock Exchanges

How-to Lessons
How to speed up watchlist and screener plug-ins when working with...
How to download and use U.S. stocks earnings data
How to create trading rules based on Put and Call volume data
How to display Forex economic calendar data in a chart
How to hide stock data outside of regular trading hours

Related Forum Threads
INTRADAY VERSION AND SIZE OF DATA BASE
how to download Intraday data for NSE Nifty - S&P CNX Nifty
Futures Intraday data not displaying
Historical intraday data limited on chart
Access intraday data while working on daily chart

Blog Posts
6 ways to download free intraday and tick data for the U.S. stock...
Day Trading: A trading system that combines intraday and EOD data
Download historical EOD data for the stock, futures, ETF and Fore...
Backtesting trading strategies using intraday data
How to filter quotes data from high and low price spikes









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.