Click here to Login





                                                   I have been thinking about automation...

  2

0
Jim Harrison
2013-10-25 00:51:58


I have been thinking about automation performance, with that in mind I have a few questions

1. Can I run Qshare without the GUI? We can use powershell to control the OS, various excel functions and basic other task styled functions. I would like to include Qshare in this process in order to further extend its use, to ease automation and I'll always take a performance enhancement if it is to be found ;)

2. 64bit Ib plug in status? Timeline?

3. When compiling a function, I assume it eventually compiles them to C or .net? or ? (what is native for Qshare)

4. Any dll examples you know of, including samples?

Thanks.




QuantShare
2013-10-26 12:02:28

  0

Best Answer
Hi Jim,

1/ You cannot run QS without the GUI. We will think further about this.

2/ Maybe 2/3 months

3/ Regarding custom functions and money management scripts for example, the language is C# (.Net) and the compilation creates an object that is loaded in memory.

4/ which dll examples are you referring to?



Jim Harrison
2013-10-27 19:19:09

  0

1. Thanks, I know you will consider the benefits if any...
2. Thanks, the sooner the better imho.
3. Thanks for confirmation.
4. I will send email.

Thanks.



Dave W.
2013-11-17 18:34:58

  0

Related to Jim's post, I am looking into semi-automating some swing trading systems. What I'm looking for is the ability to export all orders (e.g., entry, scale in, scale-out, multiple conditional exit GTC orders adjusted daily) for each symbol triggered by the systems in the portfolio tool. Right now, the portfolio tool only appears to give orders for entries and previously triggered exits. Is there a way to get the portfolio to generate the other orders (e.g., a GTC stop loss order, a GTC volatility stop order, a daily adjusted RSI(2) > 70 daily exit) on a daily basis?

If the portfolio can't do it, are there other options? Would this be do-able in a custom money management script?

On a side note, if it can't do this already, enhancing the portfolio tool to include this functionality would be very useful...

Thanks,
Dave



Zoidberg
2013-11-17 21:38:19

  0

I will be using MATLAB for some analysis.
For this purpose it could be very useful if QuantShare could be controlled through ActiveX automation (being an automation server).
Maybe an alternative is having a QuantShare .NET assembly that could be used by MATLAB and other programs.

Any plans for this? I realize this might be a big job if not already planned.
If already possible, this would be an idea for a blog post (not specifically for MATLAB, maybe using e.g. Excel+Visual Basic as examples)

Thanks.



Zoidberg
2013-11-17 23:27:19

  0

PS to my own post:
It might be equally interesting if you could explain/blog about how to connect to and control a COM Automation server, if it is possible,
similar to what is described in http://www.mathworks.se/help/matlab/matlab_external/call-matlab-function-from-a-c-client.html
If it is not currently possible, I vote for including it in a later version.

If this could be made to work, not only MATLAB, but Excel, Word, ..., could be controlled.
So far it seems I am stuck because I can not include a reference to a COM type library.

Thanks!



QuantShare
2013-11-18 13:09:46

  0

To Dave:
In order to be able to export any kind of order, the best way is to implement your logic in the money management tool and track/record every order the moment it is sent or updated.

To Zoidberg:
There is already a simple way to communicate between QuantShare and other applications
http://www.quantshare.com/sa-515-how-to-send-commands-to-quantshare-from-excel-or-other-applications

By the way, why do you want to control QuantShare using Matlab? can you give me some examples?



Zoidberg
2013-11-18 14:42:06

  0

QuantShare:
My immediate thought was to let Matlab access the quote database very efficiently through memory, without the need for writing/reading files.
Also maybe to control the downloader so that fully updated data are guaranteed, though I guess that can be done using the method described in your link.
I have experienced that export of data from QS can be done quite quickly, so maybe this is not a big issue, but it offers the possibility of streamlining the system.

The reverse functionality, QS as a (COM/ActiveX) Automation client, might be equally or more interesting, where e.g. calls to Matlab could be used everywhere c# is allowed.
For example this might be useful in backtesting.
I could then send my data (in memory) to Matlab, do my calculations, and get it back.
It would also allow users to e.g. build automatic reports in Word, fill out Excel-spreadsheets, etc.
I suspect such functionality would be simpler to implement than the server option.

This kind of functionality (QS as COM/ActiveX server and/or client) tends to open possibilities that are not so easy to see in advance.

Something to think about for the future?



Dave W.
2013-11-18 18:02:09

  0

QS Team -

To clarify your suggestion, do you mean I should implement a money management script in the Simulator to export the order data I need, and then generate daily orders out of the Simulator? Or do you mean create a money management script to do what I need and run it from the Portfolio tool each day?

A simple example that implements this process (e.g., a blog post) would be awesome :)



Dave W.
2013-11-18 18:29:31

  0

QS Team - Ignore my last post. I just saw the new blog post! Very timely. Thank you!


QuantShare
2013-11-19 11:46:35

  0

Zoidberg: Yes, sure. We already have a plugin for R. Matlab deserves a plugin too.

Dave: We did it before you ask the question :)




Zoidberg
2013-12-14 02:11:15

  0

Hi,
It would be great if you would make a MATLAB plugin that could be used from C# within QuantShare!

In the mean time, I tried to install the R-plugin and R(D)COM package etc, but have so far given up making it work.
I can access the R_Evaluate/... functions from e.g. the chart formula editor, but I only get NaN's back, presumably because I cannot
install properly the R(D)COM package.
Question 1: Are the R-functions only available (after successful install) from the Quantshare language, not from C#?
Question 2: Any tips in how to make R(D)COM package work? See my more-or-less correct description of my attempt below.
I understand that this is not really QuantShare's problem, but maybe there is some simple fix.

What I did, more or less in order, probably with some errors ;-).
This is also intended as a help to the next person trying this.
The problem is really at point 10-11 (I think)

1. Install R (some time ago, but I am not at all proficient)
2. Find info on http://www.quantshare.com/title-495-getting-r-objects-into-quantshare
3. Download the plugin from http://www.quantshare.com/free/R-Plugin.rar
4. Unpack the .rar-file using winrar from http://www.rarlab.com/
Copy files to Quantshare Directory
5. Reading somewhere that I have to install the R package rcsproxy, so doing that from the R gui menu.
6. Get the R-(D)COM Interface here http://cran.r-project.org/contrib/extra/dcom/
The link in http://www.quantshare.com/title-495-getting-r-objects-into-quantshare
is now broken.
7. Running RSetReg.exe, in case something wrong in the registry I guess, checking that registry settings OK.
8. Running R(D)COM's RServermanageradmin, trying to "Add process". Not so successful.
9. Trying the R(D)Com "Server (01) Basic Test". Fails.
10. Checking installation notes for R(D)COM, find that rproxy.dll is needed.
11. Search for rproxy.dll, find that rproxy is no longer part of the distribution, superseded by package rcsproxy (see 5 above)
But R(D)COM seems to need it!
See e. g.
http://cran.r-project.org/bin/windows/base/old/2.8.0/CHANGES.R-2.8.0
http://www.talkstats.com/showthread.php/17499-Success-using-R-%28D%29COM-under-R-2.12.2



QuantShare
2013-12-14 13:17:22

  0

Hi,

Question 1: Are the R-functions only available (after successful install) from the Quantshare language, not from C#?

Yes, currently they are available only in the QuantShare language.

Question 2: Any tips in how to make R(D)COM package work? See my more-or-less correct description of my attempt below.

Here is the link:
http://www.codeproject.com/Articles/25819/The-R-Statistical-Language-and-C-NET-Foundations

You can find clear instructions there on how to install the R(D) COM interface.






Zoidberg
2013-12-15 21:56:14

  0

Hi,
thanks a lot for your reply!
I got it to work :-)
The code-project link you provided is perhaps a little bit outdated (see comments at bottom of the page, e.g. "RServer250.exe"), but maybe of little consequence (not sure).
What I did to make things work (in addition to my long list above):
1. Install new version of statconnDCOM (3.5-1B2 Noncommercial) from http://rcom.univie.ac.at/download.html (maybe the CRAN version still works, I don't know).
As one can read from installation notes etc (of course *after* first installation attempt :-() and/or experience:
a) Noncommercial version is only available as 32bit
b) statconnDCOM (noncommercial) (and I believe also rscproxy (not "rcsproxy" as I erroneously wrote previously)) must be installed under
<R-installation>\library, NOT under your "personal user library directory"
2. (re)install rscproxy under R-installation (see 1b). You may have to run R as administrator to get write access.



GS
2014-01-05 18:31:35

  2

Hi Zoidberg/QS,

I think this is a very powerful feature and definitely deserve a blog post. I suggest something on time series forecast (combining ANN and ARIMA) would help all the users.

Thanks in advance.



Jim Harrison
2014-02-24 02:04:58

  0

seeking update re:64bit IB dll.

Timeline?



QuantShare
2014-02-26 13:25:58

  0

3/4 months


Zoidberg
2015-08-04 19:04:16

  0

Hi QuantShare,
have you done any further consideration of a possible MATLAB plugin?



QuantShare
2015-08-05 02:57:54

  0

Unfortunately no. I don't think this is something we are planning to implement now.


Christian
2018-10-24 09:44:11

  0

Could somebody please post an R-example with ARIMA forecast.
Thanks in advance.



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
Analyst Days Since Last Rating
RSI3 Box v001b 2014-02-14
TAA - Momentum and Volatility
RSI Conservative Screen
Chile: Santiago Stock Exchange

How-to Lessons
How to plot a stock using different periods in the same chart
How to create a moving average of an indicator
How to drag & drop a stock to a static watchlist
How to create a screen
How to quickly download the most recent EOD data for your stocks

Related Forum Threads
Question about an object
First time here. Questions about Excel and Quantshare
about macd?
What about this strategy?
Counting bars after a condition has been met

Blog Posts
More about QuantShare Programming Language
10 New Ways to Download Historical Stock Quotes for Free
9 mistakes you should avoid when backtesting an end-of-day stock ...
New Ranking and Percentile Composite Functions
Example of a trading system implemented in QuantShare Software









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.