Vilcabamba, Ecuador
Experience: Intermediate
Platform: Ninja
Trading: NQ, UB
Posts: 204 since Jul 2012
|
I am testing the MSMQ service and it is working well (so far) to provide messaging between a listening strategy and multiple indicators.
Had thought of Named Pipes, etc...but liked the idea of this better for some reason.
https://msdn.microsoft.com/en-us/library/system.messaging.messagequeue.aspx
I had been using a public (global) static variable but one indicator might overlay the data before the reader could get it...so this queue works well.
I found that Net 3.0 and 3.5 don't have this...it is in Net 2.x so that is where the Reference needs to point to System.Messaging.
The Receive() needs to be in a loop in side a new Thread, because it locks the thread while it is waiting for a message.
What a relief to find this tool, and not loose messages...
Good luck!
|