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

OnTimerEvent
http://www.smartquant.com/forums/viewtopic.php?f=44&t=8692
Page 1 of 1

Author:  vortex [ Mon Jan 24, 2011 4:34 am ]
Post subject:  OnTimerEvent

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.

Author:  Dr. Anton Fokin [ Mon Jan 24, 2011 7:59 am ]
Post subject:  Re: OnTimerEvent

Hi,

viewtopic.php?f=64&t=6229

Regards,
Anton

Author:  vortex [ Mon Jan 24, 2011 8:35 am ]
Post subject:  Re: OnTimerEvent

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

Author:  vortex [ Mon Jan 24, 2011 8:40 am ]
Post subject:  Re: OnTimerEvent

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

Author:  Dr. Anton Fokin [ Mon Jan 24, 2011 8:44 am ]
Post subject:  Re: OnTimerEvent

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

Author:  vortex [ Mon Jan 24, 2011 9:55 am ]
Post subject:  Re: OnTimerEvent

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.

Author:  Dr. Anton Fokin [ Mon Jan 24, 2011 10:50 am ]
Post subject:  Re: OnTimerEvent

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

Author:  vortex [ Mon Jan 24, 2011 11:03 am ]
Post subject:  Re: OnTimerEvent

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

Author:  Alexei Kurov [ Mon Jan 24, 2011 11:20 am ]
Post subject:  Re: OnTimerEvent

Hi Paul,

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

Regards,
Alex

Author:  vortex [ Mon Jan 24, 2011 11:40 am ]
Post subject:  Re: OnTimerEvent

Hi Alex,

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

Regards,
Paul.

Author:  Alexei Kurov [ Mon Jan 24, 2011 11:46 am ]
Post subject:  Re: OnTimerEvent

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

Author:  vortex [ Mon Jan 24, 2011 1:19 pm ]
Post subject:  Re: OnTimerEvent

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.

Author:  Dr. Anton Fokin [ Mon Jan 24, 2011 2:34 pm ]
Post subject:  Re: OnTimerEvent

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

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