SmartQuant Discussion
http://www.smartquant.com/forums/

Add provider does not really add
http://www.smartquant.com/forums/viewtopic.php?f=60&t=14927
Page 1 of 1

Author:  dave10030 [ Fri Aug 09, 2019 10:34 am ]
Post subject:  Add provider does not really add

I'm currently using OpenQuant2014.

I tried to add my own provider edited from Sample Provider.

Result is that the tab page did add but the control panel didn't.

How to fix this?

Attachments:
未命名.png
未命名.png [ 24.36 KiB | Viewed 1031 times ]

Author:  skuvv [ Fri Aug 09, 2019 11:50 am ]
Post subject:  Re: Add provider does not really add

Just restart of OQ2014 and provider will appear in Providers window.
Make sure that providerId is unique.
Attachment:
oec.png
oec.png [ 69.98 KiB | Viewed 1022 times ]

Author:  dave10030 [ Fri Aug 09, 2019 12:14 pm ]
Post subject:  Re: Add provider does not really add

skuvv wrote:
Just restart of OQ2014 and provider will appear in Providers window.
Make sure that providerId is unique.
Attachment:
The attachment oec.png is no longer available


Yes, I changed the id and name, and make sure they're unique, I also remove the default sample provide, but it still not working

Attachments:
擷取.PNG
擷取.PNG [ 31.77 KiB | Viewed 1021 times ]

Author:  skuvv [ Fri Aug 09, 2019 1:33 pm ]
Post subject:  Re: Add provider does not really add

Ok.
Method 1:
to understand what happens at boot time, you can try any strategy with your provider.
During initialization of framework, it will print about problems in console.

Method 2:
try create instance of provider pragmatically, to debug errors.
Code for loading:
Code:
               Type type = Type.GetType("typename"); //eg  oec sample "SampleProviders.OEC.OpenECry, SampleProviders"

               if (type != null)
               {
                   Provider provider = (Provider) Activator.CreateInstance(type, framework);
               }


ps for both cases, place your providers in the root of application folder.

Author:  dave10030 [ Fri Aug 09, 2019 3:45 pm ]
Post subject:  Re: Add provider does not really add

skuvv wrote:
Ok.
Method 1:
to understand what happens at boot time, you can try any strategy with your provider.
During initialization of framework, it will print about problems in console.

Method 2:
try create instance of provider pragmatically, to debug errors.
Code for loading:
Code:
               Type type = Type.GetType("typename"); //eg  oec sample "SampleProviders.OEC.OpenECry, SampleProviders"

               if (type != null)
               {
                   Provider provider = (Provider) Activator.CreateInstance(type, framework);
               }


ps for both cases, place your providers in the root of application folder.




Problem maybe solved, I tried other IDs, seems like 0~100 is valid if it is unique, 101~255 is invalid even if it is unique

Page 1 of 1 All times are UTC + 3 hours
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/