Click here to Login





                                                   Data time-frame

  1

0
Seeker
2014-01-20 08:29:44


In terms of data-source time-frame, what I understand is:

1. Intra-day and daily data should be in different files.
2. When the intra-day data is plotted, it cannot be compressed into daily (except by referring to 86399 seconds to denote day). Switching the chart from 1h to daily will not work.
3. In order to refer to a daily series/calculation while being in an intra-day time-frame, TimeframeSet(-1)/TimeframeRestore()/timeframedecompress functions are used.

When we use TimeframeSet(-1), how does it work? If I am working with hourly data and apply TimeframeSet(-1), does it compress the same hourly data into daily or does it look for another file where the daily data is present? If so, how does it relate to it? Is it that "Name" field should be same or matches the "Name" of the hourly data with either of the Name, Name1,Name2 in the daily data? I see that we cannot have the same "Name" for two symbols irrespective of their time-frame.

Now, my situation. I am using metastock data and has separate hourly and daily folders for the same security. The symbol names for hourly and daily are different. How do I use TimeframeSet(-1) here?
Also, is there a way in charting, when I change time-frame to daily from 1h, it goes to the daily file and plots it if I give a common name under Name1 or Name2 for both 1h and dailly?

Sorry for being too wordy about it. Many thanks as usual.



QuantShare
2014-01-20 13:27:24

  1

Your understanding is correct. EOD and Intraday data are saved into different databases.

When you use "TimeframeSet(-1)", data from the EOD database is used and synchronized with the intraday data. Of course the EOD data for the same ticker symbol is used by default but you can get data for any other symbol.

If you want to get EOD data for another symbol, you should create a custom function (Tools -> Create Functions) and use the "cFunctions.GetCustomDatabaseData" function.

You can also get daily data from intraday data using "HistoPrice" function.




Seeker
2014-01-20 15:29:08

  0

I think I missed one important aspect. That symbol info will have only one entry for both the daily and intra-day data. I mean, if I load an intra-day data with symbol name "XYZ" and then a daily data with the same symbol name "XYZ", "manage symbols" will show only one "XYZ" (one row) rather than "XYZ" twice for intra-day as well daily. My confusion rose from this. Many thanks.

Now, if the symbol name for intra-day data is "ABC" but the symbol name for daily data (quotes) is "DEF", what is the best way to relate them in charting and other calculations?

"If you want to get EOD data for another symbol, you should create a custom function (Tools -> Create Functions) and use the "cFunctions.GetCustomDatabaseData" function" - is it for a situation when I am looking for fields from a custom database?

Also, how can I rename symbol names (Symbol Info - Name)?



QuantShare
2014-01-20 16:47:39

  0

Best Answer
My mistake, the function is: cFunctions.GetTimeframeData

Example:
VectorD close = cFunctions.GetTimeframeData("symbol", 1, "close", true).ToVectorD();

To rename a symbol, you must use a script (Tools -> Script Editor):
Symbols.RenameSymbol("oldName", "newName");





Seeker
2014-01-21 12:35:09

  0

How about the situation when I use external metastock database which has different symbols for hourly and daily data? The above function, as I understand it, refers time-frame data of a "particular" symbol. I am trying to think whether there can be a solution by giving a common Name1 to both the hourly and daily symbols. Though not able to think clearly how to achieve my purpose with it!


QuantShare
2014-01-21 13:39:16

  0

The solution would be to update the symbols for hourly data and set their "Name1" to the symbols of daily data.
When creating functions, you can reference the "Name1" field using:
cFunctions.SymbolInfo.Name1




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
Intraday Data for NSE Stocks
ISE index options historical data
EOD Data for Muscat Securities Market
Singapore Exchange EOD Data - SGX - Last 20 days
Market cap, ROE, ROA and Forward PE for U.S. Stocks - Fundamental...

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 import trading data from CSV files
How to export trading data to a CSV file
How to create trading rules based on Put and Call volume data

Related Forum Threads
how to download Intraday data for NSE Nifty - S&P CNX Nifty
Intraday data outside range
TradeStation Data Feed
Importing daily metastock data
How data management works

Blog Posts
How to Import Metastock data into QuantShare
Step by step on how to get free realtime/delayed data for stocks,...
Reading and Exporting Data from QuantShare to Excel Programmatica...
Charting, Backtesting and Trading using Fundamental Data
4 Links to Download Free Historical Stock Prices Data by Date









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.