SmartQuant Discussion

Automated Quantitative Strategy Development, SmartQuant Product Discussion and Technical Support Forums
It is currently Sat Dec 15, 2018 10:49 am

All times are UTC + 3 hours




Post new topic Reply to topic  [ 14 posts ] 
Author Message
PostPosted: Sun Oct 16, 2016 9:43 pm 
Offline

Joined: Tue Feb 23, 2016 10:43 pm
Posts: 16
I wrote a custom provider (very rudimentary) and want to deploy to OpenQuant IDE, I placed the dll and pdb file in OpenQuant installation directory and hope to find it in tool->Options->Providers but

1) I cant find my provider name
2) Add/Remove buttons are greyed out

Can you please help? What is the correct procedure to develop a custom provider?

J


Attachments:
GreyedOutProvider.PNG
GreyedOutProvider.PNG [ 60.88 KiB | Viewed 4143 times ]
Top
 Profile  
 
PostPosted: Sun Oct 16, 2016 10:36 pm 
Offline

Joined: Tue Aug 05, 2003 3:43 pm
Posts: 6810
Hi,

you can add a custom provider by editing framework configuration file, configuration.xml in AppData/Roaming/SmartQuant Ltd/OpenQuant 2014/config.

Like this

<Provider>
<TypeName>SmartQuant.CQG.CQGFIX, SmartQuant.CQG</TypeName>
<X64>true</X64>
</Provider>


Regards,
Anton


Top
 Profile  
 
PostPosted: Mon Oct 17, 2016 12:47 am 
Offline

Joined: Tue Feb 23, 2016 10:43 pm
Posts: 16
What is the requirement in provider plugin file other than editing XML? I.e. How we link the XML to my provider file?

What's with the greyed out add/remove buttons, seems a bug, unfinished work?

j


Top
 Profile  
 
PostPosted: Mon Oct 17, 2016 1:13 pm 
Offline

Joined: Wed May 05, 2010 9:49 pm
Posts: 443
Hello f5trading11c,
OpenQuant2014 was updated, buttons are usable now.

Your provider file should be placed in OpenQuant2014 folder near SmartQuant.dll.

For usage in strategy without GUI - just copy provider file in strategy folder near SmartQuant.dll.


Top
 Profile  
 
PostPosted: Thu Oct 20, 2016 11:18 pm 
Offline

Joined: Tue Feb 23, 2016 10:43 pm
Posts: 16
Hello Skuvv,

I tried the new version with buttons enabled. i can added my provider to the list and it did change the xml file but it wont populate in the provider window in OQ IDE. Also notice the Xml file x64 wont set to true even though I target my provider to x64 with .Net 4.5.1. May seem as a bug.

You can take the SampleProvider's OpenECry custom provider for example. What I do is as follow,
1) compile and build the SampleProvider code to Release folder.
2) Copy paste the SampleProvider dll to SmartQuant\OpenQuant2014\folder,
3) Go to tool -> Provider -> Add the dll, (it changes configuration.xml) but no show under provider window in OQ IDE
4) Restart OQ doesnt help either.


Please let me know how to fix this.

J


Top
 Profile  
 
PostPosted: Fri Oct 21, 2016 11:06 am 
Offline

Joined: Wed May 05, 2010 9:49 pm
Posts: 443
f5trading11c, thx for information.
All you need is change id of sample provider, it should be less than 100, eg:
Code:
base.id = 90;


Top
 Profile  
 
PostPosted: Fri Oct 21, 2016 4:04 pm 
Offline

Joined: Tue Feb 23, 2016 10:43 pm
Posts: 16
Thanks Skuvv, it works now. Maybe you should fix this bug in the future.


Top
 Profile  
 
PostPosted: Fri Oct 21, 2016 4:29 pm 
Offline

Joined: Tue Aug 05, 2003 3:43 pm
Posts: 6810
Well, this is not really a bug. Ids above 99 are reserved for SellSideStrategies (which are also Providers), so we don't show providers with Ids >= 100 in the provider window.

Regards,
Anton


Top
 Profile  
 
PostPosted: Tue Oct 25, 2016 1:58 am 
Offline

Joined: Tue Feb 23, 2016 10:43 pm
Posts: 16
Been working on my provider plugin, using Sample provider as a template, I am able to make it work in ConsoleApp, however when I deploy to IDE and hit Connect, it freezes the IDE. I wonder if you can share some tips and if there's a quick fix to my problem. Seems like a issue with GUI esp. Thread problem?

J


Top
 Profile  
 
PostPosted: Tue Oct 25, 2016 10:54 am 
Offline

Joined: Wed May 05, 2010 9:49 pm
Posts: 443
I think best way - attach VS to OQ process and make debug OnConnect of your provider.


Top
 Profile  
 
PostPosted: Tue Oct 25, 2016 6:03 pm 
Offline

Joined: Tue Feb 23, 2016 10:43 pm
Posts: 16
Problem is how do I debug provider since it can only be a dll to be loaded to OQ IDE?


Top
 Profile  
 
PostPosted: Wed Oct 26, 2016 10:41 am 
Offline

Joined: Wed May 05, 2010 9:49 pm
Posts: 443
f5trading11c wrote:
Problem is how do I debug provider since it can only be a dll to be loaded to OQ IDE?

Try do next steps:
1)Compile your provider and add him to OpenQuant.
Restart OQ if necessary (to provider be shown).
2)Make a breakpoint in OnConnect() method in VS.
3)Attach your Visual Studio with provider solution to OpenQuant process.
At this step a breakpoint should be red(means that it will work).
4)Press connect at your provider in OpenQuant.
Breakpoint should be executed in VS.

Will be looks like this (OEC sample solution attached to OpenQuant):
Attachment:
oec_sample_debug.png
oec_sample_debug.png [ 34.2 KiB | Viewed 4051 times ]


Top
 Profile  
 
PostPosted: Wed Oct 26, 2016 10:15 pm 
Offline

Joined: Tue Feb 23, 2016 10:43 pm
Posts: 16
My apologies. I am not getting this to work.

I compiled my provider to dll, copied and pasted the dll and pdb files in debug folder to OpenQuant2014 folder where smartquant.dll is located.

Restarted OQ, reloaded the provider through tool -> Providers

Restarted OQ again to let provider show up in provider window

now in VS 2015, I open my provider solution, which generates the dll and pdb.

Set breakpoint at OnConnect,

attach process to OpenQuant 2014 where new provider is shown and ready to be connect

Click Connect and expect VS will be hit with breakpoint

But no, it didnt seem to attach properly.

This does not make sense as I am debugging the c# solution source code linked by a assembled dll/pdb ?


Top
 Profile  
 
PostPosted: Thu Oct 27, 2016 9:51 am 
Offline

Joined: Wed May 05, 2010 9:49 pm
Posts: 443
Ok, can you debug any strategy?
Can you attach and debug VS with opened file/solution of strategy to OpenQuant process?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 14 posts ] 

All times are UTC + 3 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group