Click here to Login





                                                   Importing BID/ASK ticks from a .CSV

  0

0
M808
2016-06-14 12:25:43


Hi QS,

When importing BID/ASK tick data from a .CSV a popup comes saying to specify "a value of 2(bid) or 1(ask) in the 'OpenInt' field"

Does this mean each row of the .CSV itself needs have a column with a 2 or a 1 in it?
Or does it just mean I need to type a 2 or a 1 into Quantshares's ASCII GUI (if so, where do I type in the 2 or 1 exactly)?

thanks!



QuantShare
2016-06-14 18:27:14

  0

This means that either the CSV needs to have a column with 2 or 1 in it or you can create a pre-script to update the "OpenInt" column with 2 or 1 values programmatically.


M808
2016-06-15 13:42:09

  0

Thanks

No worries if not, but can you please post a code example for a "pre-script to update the "OpenInt" column with 2 or 1 values programmatically." ?

I've tried writing one a few times, but don't think I got it to work properly.



QuantShare
2016-06-15 17:37:34

  0

Here is an example: (Symbol name: AA)
int f = 0;
for(int i=0;i<Content.Rows.Length;i++)
{
// Ignore original line
Content.Rows[i].IsIgnoreLine = true;
// Add a line for the last, bid and ask, each one with a sligthly different time
Content.AddRow("AA", Content.Rows[i].Data[0] + " " + Content.Rows[i].Data[1] + ":" + f, Content.Rows[i].Data[2], "0", Content.Rows[i].Data[5]);
f++;
Content.AddRow("AA", Content.Rows[i].Data[0] + " " + Content.Rows[i].Data[1] + ":" + f, Content.Rows[i].Data[3], "1", Content.Rows[i].Data[5]);
f++;
Content.AddRow("AA", Content.Rows[i].Data[0] + " " + Content.Rows[i].Data[1] + ":" + f, Content.Rows[i].Data[4], "2", Content.Rows[i].Data[5]);
f++;

if(f > 20)
{
f = 0;
}
}


//// Sample data to be parsed:
Date,Time,Last,Ask,Bid,LastSize
12/18/2009,10:36:30,52.84,52.82,52.84,100
12/18/2009,10:36:30,52.84,52.82,52.84,100
12/18/2009,10:36:30,52.84,52.82,52.84,100
12/18/2009,10:36:47,52.83,52.83,52.85,100



M808
2016-06-17 00:43:35

  0

great, thanks!


M808
2016-08-10 23:12:25

  0

Hello again, I think I may have misunderstood something about this.

Can you please post a sample CSV of the final result of how Bid and/or Ask data is supposed to look before it is imported into Quantshare?



QuantShare
2016-08-12 07:19:56

  0

In the example I sent you the data is transformed using the "pre-script".

If you want to have ready to use data to be imported, it should look like this:

//// Sample data to be parsed:
Date,Time,Last,Type,LastSize
12/18/2009,10:36:30,52.84,0,100
12/18/2009,10:36:30,52.84,1,100
12/18/2009,10:36:30,52.84,1,100
12/18/2009,10:36:30,52.84,2,100



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
News data for US companies from Google RSS feed
Combination Element from Lexicographical Index
Stock Picks from Wikinancial
Market cap, ROE, ROA and Forward PE for U.S. Stocks - Fundamental...
Stock News from Articles, Bloggers, Columnists, Traders and Analy...

How-to Lessons
How to run a screen or a watchlist from a script
How to generate buy/sell signals from a trading system
How to hide a trading indicator from a particular time frame
How to import trading data from CSV files
How to import trading items from other accounts

Related Forum Threads
Importing Trade Ticks from a .CSV
How to import Bid, Ask and Trade ticks from CSV file?
Custom Date Format When Importing Data from CSV
Importing portfolio from a comma delimted file
How do I Import Tick Data from a CVS file

Blog Posts
How to filter quotes data from high and low price spikes
How to Calculate and Display the Bid/Ask Spread on a Chart
How to Backtest a Strategy from a Chart
Reading and Exporting Data from QuantShare to Excel Programmatica...
Export Trading Orders from a Portfolio to a File









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.