Click here to Login





                                                   Unable to use Symbols.GetSymbols() in a custom downloader URL script

  0

0
Dev
2018-11-21 08:02:27


I'm adding a new custom downloader. I am creating a URL script so that I can download end of day data for various instrument types such as stocks and currencies.
In the URL script I am unable to call Symbols.GetSymbols() to get a list of all the symobls so that I can create a custom URL depending on whether the symbol is a stock
, currency or whatever other type of instrument. I am finding the scripting a bit inconsistent in that in some case I can access certain built in functions and in others I cannot.
Can you please give me a example of how I can access a list of all the symbols in the URL script ?

Thanks.



QuantShare
2018-11-21 10:57:16

  1

Each part of the application has its own scripting function.

The URL-Script can use the symbols you are referring in the "Symbols" tab of the downloader.
string[] values = Functions.GetAllValues("parameter name");
Will get all symbols you specify in the "Symbols" tab. "Parameter name" is the field name associated with "Symbol" type.

You can still get all symbols in your database without this. Here is how to get access to the "Symbols" class.
using QuantShare.Scripting;
Symbols sym = new Symbols();
Symbol[] symbols = sym.GetSymbols();



Dev
2018-12-05 10:06:10

  0

I have tried using this in the Downloader Pre Sscript, but the approach using the Symbols Class does not work, I get a compilation error, can you recommend how I can access the Symbols class from the Pre Script.

The basic error I get is as follows:

The type of namescpae name Symbol could not found, missing assembly reference.



QuantShare
2018-12-06 02:30:02

  0

You cannot access "Symbol" from the pre script, but why do you need to use this in the pre-script? You can use the post script.
Otherwise there should be another solution for this. For example, you can get all symbols (in a string[] Array) in the URL-script and pass the result to a global variable using the "Global" class. Then in the pre script, you can access to all symbols by accessing the previously defined global variable.



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
Identify Spilts Screener Script
Metatrader Historical Data Downloader
Quandl.com Universal Downloader
Custom High/Low Range
Upside-Downside and Custom Standard Deviation

How-to Lessons
How to use a custom drawing tool
How to download and use U.S. stocks earnings data
How to create a custom trading indicator
How to automatically start a downloader every few minutes?
How to get stocks for a particular index using the global script

Related Forum Threads
Can you access custom functions from the downloader script events...
Multi threading URL requests in downloader
Script or Custom Function? past _X_ closes less than current clos...
Can a Money Management script access a custom function?
how to use the intraday downloader

Blog Posts
How to create custom databases in your trading software
Create custom metrics for the statistical data analysis tool
How to Create a Custom Real-Time Table using QS Trading Software
Speed Up Optimizations by Saving Ranking Data into a Custom Datab...
Trading System Analysis: Backtesting report and custom measures









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.