Click here to Login





                                                   how to remove non trading day entries

  0

0
ivanf
2017-04-05 19:58:33


Hi All,

newbie question

I am importing Metastock data using the published QS process, however my data provider includes non trading days ( like public holidays) in the data , which is a pain.

I'm not a coder, but could somebody help with a method of removing these entries, ideally as a pre or post script during importation.

I'm already running a pre-script to append a letter to the symbol ( see below) , so I don't want this to somehow break if I was to add a script to remove the non trading days

for(int i=0;i<Content.Rows.Length;i++)
{
Content.Rows[i].Data[0] = Content.Rows[i].Data[0] + ".AX";
}



thanks in advance
Ivan



QuantShare
2017-04-06 04:14:06

  0

Hi Ivan,

If on these days (public holidays) the reported volume is 0 then you can add a line in the pre-script to check for the volume and ignore the line accordingly.



ivanf
2017-04-06 19:03:08

  0

ok thanks for the reply , could you provide me the code to do this please ?


QuantShare
2017-04-07 03:43:02

  0

Best Answer
That depends on the data you have but it should be something like:

int volumeIndex = 5;
for(int i=0;i < Content.Rows.Length;i++)
{
if(Content.Rows[i].Data[volumeIndex] == "0")
{
Content.Rows[i].IsIgnoreLine = true;
}
}



ivanf
2017-04-07 07:38:49

  0

thanks ! works as I needed


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
Number of IPOs per Day - Trading Composite
Time-series Sum for the first Minutes/Hours of a Trading Day
Number of Potential Splits per Trading Day
Tax Implications for Your Trading System
Forex Trading Indicator - Better than expected Economic Calendar ...

How-to Lessons
How to generate buy/sell signals from a trading system
How to plot the number of stock tweets per day
How to get trading orders from a portfolio programmatically
How to add a trading indicator to a chart
How to create trading rules based on Put and Call volume data

Related Forum Threads
How to determine if the a given day is a trading day?
How to create a Trading Object
How to get the last day of the month in C#
How to edit a trading system i've downloaded from shared server?
Day trading system

Blog Posts
How to get buy and sell orders for a portfolio based on a trading...
How to create buy and sell trading rules based on News Data
How to create a trading indicator that uses stock news
How to Switch On/Off Trading Rules in Your Stock Trading System
How to Download Trading Data for Certain Securities Only









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.