Click here to Login

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


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 ?


2018-11-21 10:57:16


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();

2018-12-05 10:06:10


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.

2018-12-06 02:30:02


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


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"


Trading Items
Identify Spilts Screener Script
Metatrader Historical Data Downloader Universal Downloader
Export Indicators Data - Custom Time Frame
Custom High/Low Range

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 debug a downloader

Related Forum Threads
Can you access custom functions from the downloader script events...
Multi threading URL requests in downloader
Can a Money Management script access a custom function?
how to use the intraday downloader
How do I use version 3.42 with custom data?

Blog Posts
How to create custom databases in your trading software
Create custom metrics for the statistical data analysis tool
Speed Up Optimizations by Saving Ranking Data into a Custom Datab...
Trading System Analysis: Backtesting report and custom measures
The custom trading indicators tool explained

Create an account
Affiliate Program
Contact Us
Trading Forum
How-to Lessons
About Us
Terms of Use

Copyright 2019
Social Media
Follow us on Facebook
Twitter Follow us on Twitter
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.