SmartQuant Discussion

Automated Quantitative Strategy Development, SmartQuant Product Discussion and Technical Support Forums
It is currently Wed Jan 29, 2020 7:07 pm

All times are UTC + 3 hours




Post new topic Reply to topic  [ 13 posts ] 
Author Message
 Post subject: OnTimerEvent
PostPosted: Mon Jan 24, 2011 4:34 am 
Offline

Joined: Sat Jan 22, 2011 1:40 am
Posts: 73
Hello,

I want to implement timer in my strategy with OnTimerEvent event. This is standard event in C#.
I want to have interval = 10 sec to get quotes and send orders in this event .

Can I do it in OpenQuant? Is their a better option for me to get quotes every 10 sec?

Thank you very much,
Paul.


Top
 Profile  
 
 Post subject: Re: OnTimerEvent
PostPosted: Mon Jan 24, 2011 7:59 am 
Offline

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

viewtopic.php?f=64&t=6229

Regards,
Anton


Top
 Profile  
 
 Post subject: Re: OnTimerEvent
PostPosted: Mon Jan 24, 2011 8:35 am 
Offline

Joined: Sat Jan 22, 2011 1:40 am
Posts: 73
Anton,

Thank you very much for you reply. But I need another timer. I need a timer which will have event every 10 seconds, but not just once at specified time. As I can see in the example you provided you have event which will be fired just once.

The alternative for that will be using a very small 10 sec interval and use OnBarOpen or OnBarSlice events. I think that timer might be more efficient.

I do not have enough memory to run my strategy with 860 symbols and looking for alternatives.

regards,
Paul


Top
 Profile  
 
 Post subject: Re: OnTimerEvent
PostPosted: Mon Jan 24, 2011 8:40 am 
Offline

Joined: Sat Jan 22, 2011 1:40 am
Posts: 73
Anton,

I think I can use the timer you recommended if I will use AddTimer(Clock.Now.AddSeconds(10)); in every OnTimer event.
Am I right?

Thank you very much,
Paul


Top
 Profile  
 
 Post subject: Re: OnTimerEvent
PostPosted: Mon Jan 24, 2011 8:44 am 
Offline

Joined: Tue Aug 05, 2003 3:43 pm
Posts: 6816
Yes, correct. Another question is why you get out of memory exception. Have you configured OpenQuant as discussed in this FAQ

viewtopic.php?f=64&t=6427

Regards,
Anton


Top
 Profile  
 
 Post subject: Re: OnTimerEvent
PostPosted: Mon Jan 24, 2011 9:55 am 
Offline

Joined: Sat Jan 22, 2011 1:40 am
Posts: 73
Anton,

Thank you very much for your reply. I double checked my settings and I have all settings the same as recommended on the link.

I have also another problem now. My TWS can not be started after I installed OpenQuant 64 bit. I have a message

Java Virtual Machine Launcher Error:could not open 'C:\Program Files\Java\jreg6\lib\amd64\jvm.cfg'

I tried to reinstall TWS, but it did not help. It worked just before I installed OpenQuant.

I have Windows 7 64bit on my PC. I understand that it is not part of your support but just in case you know could you please help.

The problem is not easy to solve and Tomorrow I have to support my client.

Thank you very much,
Paul.


Top
 Profile  
 
 Post subject: Re: OnTimerEvent
PostPosted: Mon Jan 24, 2011 10:50 am 
Offline

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

I have IB and OQ 64 bit running on Win 7 on my computer. I've never seen such a problem.

I think you should try to reinstall Java...

Regards,
Anton


Top
 Profile  
 
 Post subject: Re: OnTimerEvent
PostPosted: Mon Jan 24, 2011 11:03 am 
Offline

Joined: Sat Jan 22, 2011 1:40 am
Posts: 73
Anton,

I tried to reinstall it already, but it did not help, probably some java information still there. I have to do complete clean up for registry, temp files etc. After installing OpenQuant people from Norton support worked on my PC remotely to fix a problem about security message about OpenQuant. May be they created another problem. I would suggest you do not recommend to use Norton 360 together with your product.

Just in case if you know some good way to uninstall java completely let me know please, I am struggling with the problem for a long time.
Next week I have to do stress test for OpenQuant for the strategy we are using now in AmiBroker. I already implemented it in OpenQuant and if we will have similar results and similar or better performance then we can make a move to OpenQuant or even to better version of it.

Regards,
Paul


Top
 Profile  
 
 Post subject: Re: OnTimerEvent
PostPosted: Mon Jan 24, 2011 11:20 am 
Offline
Site Admin

Joined: Thu Jul 17, 2003 10:39 am
Posts: 1478
Hi Paul,

Try to install Java 32 bit. Sometime ago I have encountered the problem with TWS and java64 on Vista.

Regards,
Alex

_________________
SmartQuant Development Team


Top
 Profile  
 
 Post subject: Re: OnTimerEvent
PostPosted: Mon Jan 24, 2011 11:40 am 
Offline

Joined: Sat Jan 22, 2011 1:40 am
Posts: 73
Hi Alex,

Thank you for your reply. I have OpenQuant 64 bit. Will it work if I install JAVA 32 bit?

Regards,
Paul.


Top
 Profile  
 
 Post subject: Re: OnTimerEvent
PostPosted: Mon Jan 24, 2011 11:46 am 
Offline
Site Admin

Joined: Thu Jul 17, 2003 10:39 am
Posts: 1478
Hi Paul,

OpenQuant is .NET application, it does not require java vm. But java is needed for TWS. I had a problem to run TWS with java 64 bit on Vista x64. The problem was solved by installing java 32 bit

Regards,
Alex

_________________
SmartQuant Development Team


Top
 Profile  
 
 Post subject: Re: OnTimerEvent
PostPosted: Mon Jan 24, 2011 1:19 pm 
Offline

Joined: Sat Jan 22, 2011 1:40 am
Posts: 73
I just want to let you know that I solved the problem. It might be interesting for you.
I installed JAVA 64 bit.
I copied everything from java\jdk1.6.0_18\Jre and put it into java\jre6.

Everything is working now.

Regards,
Paul.


Top
 Profile  
 
 Post subject: Re: OnTimerEvent
PostPosted: Mon Jan 24, 2011 2:34 pm 
Offline

Joined: Tue Aug 05, 2003 3:43 pm
Posts: 6816
Thanks for sharing. Perhaps it would also be intersting for you to talk to Norton guys and discuss this issue in connection with their "fixes" :)

Cheers,
Anton


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 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