Click here to Login





                                                   GetCustomDatabaseData

  0

0
TheGrumble
2011-12-14 02:50:34


I am trying to get database information for symbols in an indicator and I have not been able to correctly access the VectorCustom structure.
Here is the code.

cFunctions.SetForwardAndBackwardBars((int) thisPeriod[0], 0);
VectorCustom curSym = cFunctions.GetCustomDatabaseData("Quotes", "Close", "MSFT");

int numberOfBars = sumVal.Length;
Global.Trace("COUNT: " + curSym.Length.ToString());


for (int i = 0; i < numberOfBars; i++)
{
//sumVal[i]= (double) curSym;
//Global.Trace("RI: "+sumVal[i].ToString() + " " + curSym[i].ToString());
}

result=sumVal;

Any access to the VectorCustom structure produces the following error:

Compilation error in 'myIndex':
Object reference not set to an instance of an object.

Any ideas? Can I get addtional info on how to best query this information from an indictor.

Thanks




QuantShare
2011-12-14 04:31:23

  0

Best Answer
"Quotes" is not a custom database.

Here is how to get close price series for MSFT:

VectorCustomDouble curSym = cFunctions.GetTimeframeData("MSFT", cFunctions.Timeframe, "close");




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
KST indicator
Dynamic Zones RSI - Technical Indicator
Rebalance & Combine & backtest two trading strategies
Company Net Income - US Stocks
CBOE Options Issues Traded

How-to Lessons
How to draw distances on a chart?
How to create a mobile database/account
How to get stocks for a particular index using the global script
How to create and trade a Neural Network model
How to create a custom trading indicator

Related Forum Threads
using GetCustomDatabaseData on Earnings calendar database
HOW to write rule?
Rank using simulation
Optimisation questions
about macd?

Blog Posts
How to download the history of dividend payments for stocks in th...
Correlation of market indicators
New features in QuantShare - Trading Software
Historical volatility estimators
Creating a download item: Initial Jobless Claims









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 © 2025 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.