Click here to Login





                                                   Watchlist and Script Editor

  0

0
Salvatore Gaziano
2017-11-23 05:17:32


Hi,
is there an option to create or modify Watchlist thorugh Script Editor?
Thank you



QuantShare
2017-11-24 05:01:31

  1

Best Answer
Hi,

It is only possible to open (Watchlist.Open) and get watchlist results (Watchlist.GetSymbols) from the script editor.



Salvatore Gaziano
2017-11-24 05:55:06

  0

Hi, thank for your reply. Do you'll plan to insert set methods for Watchlist in the next version of Quantshare?
I think that it is helpful to make or modify dynamically the watchlist sets.



QuantShare
2017-11-25 02:36:53

  0

We do not think we will implement this because you can already create formulas and screen for symbols directly using the Script editor without the watchlist or the screener tool.


SystemTrade
2017-11-27 12:51:17

  1

Hi Enrico,

I don't know why you need watchlist modification but I had a similar need when I thought about portfolio optimization. My question was whether I can increase the fitness of a given portfolio by eliminating one or more symbols from a given portfolio and I wanted to have an automated solution.

Here is my approach:
1. My watchlist contains all the symbols of my portfolio and will not/cannot change during the whole process.
2. This (initial) list of symbols gets copied into a global variable (or flat text file). This will represent the modified list of symbols.
3. I will have a custom function then to check whether a certain symbol still is in my list, let me call it IsInList(parameter1), it will just check if the parameter1 is included in my modified list of symbols and then returns 1 or if not, returns 0.
4. My buy statement will look like buy = [my buy rules] & IsInList(name()); this will allow only symbols from the modified list to get bought.
5. By means of another custom function ModifyList(parameter1), I will update the list of symbols through the strategy and/or AMM.

Please be aware that you should not operate this in multithreading mode nor should you use AI.

I hope this is of some help for you, please let me know if you need further details.



Salvatore Gaziano
2017-11-28 03:24:32

  0

Hi SystemTra.de,
thank you for this solution!
My problem is a bit complicated: i've a web app that i use to manage my customer and their portfolio. I can access at this data thorugh REST web services, then my intention is to create watchlists through Script Editor and set the symbols from the result returned by my web service.
The benefit is that i've a watchlist updated that i can use in the Screener to monitor my open positions (and i don't update manually the watchlist every time that i sell/buy a position).



QuantShare
2017-11-28 06:44:48

  1

Here is what you can do.
1/ Create a watchlist then set the symbols filter to "Symbol Info -> Name3 = ST1" (example)
2/ Get your list of symbols from the REST service, update the Name3 field of each symbol to ST1
3/ Open or refresh watchlist using "Watchlist.Open"



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
Buy signal watchlist And Buy signal on your Chart (Red Spot)
Recent mergers and acquisitions
Parallel Resistance and Support Lines
Dividend Yield Watchlist
Identify Spilts Screener Script

How-to Lessons
How to run a screen or a watchlist from a script
Difference between the watchlist and the screener tools
How to speed up watchlist and screener plug-ins when working with...
How to create a watchlist
How to get stocks for a particular index using the global script

Related Forum Threads
DISCREPANCIES IN SCREENING BY SCREENER AND SCREENING THRU WATCHLI...
Money Management Script variables and more
Money Management script and exit options in the wizard
Adding symbols and changing properties from script
Accessing Symbol Info in Screener, Strategy script and in MM tool...

Blog Posts
Backtest Trading Strategies Programmatically and on Schedule
QS Trading Software: Global Script
Compare stocks and securities by creating a relative performance ...
Step by step on how to get free realtime/delayed data for stocks,...
How to Scan for Parallel Resistance and Support Lines









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.