Profile Picture

Cant go live with MBTrading

Posted By atul 8 Years Ago
Message
Crazy Posted Monday February 16 2009
Hi Bill, Experts,
 
I am able to load MBTrading in Backtesting and see the results in a primitive system that I have build.  But when I do F5 (run live), it throws the following exception and doesnt run.  This is strange and annoying.  Can you please tell me the fix for it?  The exception occurs when its processig step#4 (SwitchToLiveMode & SetSystemBroker)
 
Thanks,
Atul
 
-------------
 
Error in broker service connect.
Unable to connect to MB Trading
   at RightEdge.Shared.SystemWrapper.SetSystemBroker(BrokerAccountState accountState)
   at RightEdge.Shared.SystemWrapper.SwitchToLiveMode(ServiceFactory brokerFactory, BrokerAccountState accountState, Boolean bFullSim, Boolean bSameBroker)
   at RightEdge.Shared.SystemWrapper.SwitchToLiveMode(ServiceFactory brokerFactory, BrokerAccountState accountState, Boolean bFullSim, Boolean bSameBroker)
   at RightEdge.Shared.TradingModuleWrapper.SwitchToLiveMode(ServiceAppDomainFactory brokerFactoryFactory, BrokerAccountState accountState, Boolean bFullSim, Boolean bSameBroker)
   at RightEdge.LiveSystemwindow.StartLiveSystem(xfb471916970b0c9e liveDataWindow, List`1 symbols, SystemDataCreationSettings settings, SystemRunInfo runInfo, RightEdgeCompiler compiler)
   at RightEdge.xf266856f631ec016.x7315d87aa80c241d()
   at RightEdge.xf266856f631ec016.xc44f2b7498b700f7(Object xe0292b9ed559da7d, EventArgs xfbf34718e704c6bc)
   at TD.SandBar.ToolbarItemBase.OnActivate()
   at TD.SandBar.ButtonItemBase.OnActivate()
   at TD.SandBar.ButtonItem.OnActivate()
   at TD.SandBar.ToolBar.OnItemRelease(ToolbarItemBase item, Point position)
   at TD.SandBar.ToolBar.OnMouseUp(MouseEventArgs e)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at TD.SandBar.ToolBar.WndProc(Message& m)
   at RightEdgeUI.CustomToolBar.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativewindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativewindow.WndProc(Message& m)
   at System.Windows.Forms.Nativewindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Posted Monday February 16 2009
MB Trading only allows one connection.  So if you have Navigator running when running RightEdge, this would cause this problem.  Also, if you have MBT for your data provider and broker within RightEdge this could also cause the problem since broker and data are separate.  We're working on a connection proxy that will allow you to use RE & MBT as both data and broker, but it won't help the Navigator & RE scenario.  You may want to get with MBT to change their policy.

atul (2/16/2009)
Hi Bill, Experts,
 
I am able to load MBTrading in Backtesting and see the results in a primitive system that I have build.  But when I do F5 (run live), it throws the following exception and doesnt run.  This is strange and annoying.  Can you please tell me the fix for it?  The exception occurs when its processig step#4 (SwitchToLiveMode & SetSystemBroker)
 
Thanks,
Atul
 
-------------
 
Error in broker service connect.
Unable to connect to MB Trading
   at RightEdge.Shared.SystemWrapper.SetSystemBroker(BrokerAccountState accountState)
   at RightEdge.Shared.SystemWrapper.SwitchToLiveMode(ServiceFactory brokerFactory, BrokerAccountState accountState, Boolean bFullSim, Boolean bSameBroker)
   at RightEdge.Shared.SystemWrapper.SwitchToLiveMode(ServiceFactory brokerFactory, BrokerAccountState accountState, Boolean bFullSim, Boolean bSameBroker)
   at RightEdge.Shared.TradingModuleWrapper.SwitchToLiveMode(ServiceAppDomainFactory brokerFactoryFactory, BrokerAccountState accountState, Boolean bFullSim, Boolean bSameBroker)
   at RightEdge.LiveSystemwindow.StartLiveSystem(xfb471916970b0c9e liveDataWindow, List`1 symbols, SystemDataCreationSettings settings, SystemRunInfo runInfo, RightEdgeCompiler compiler)
   at RightEdge.xf266856f631ec016.x7315d87aa80c241d()
   at RightEdge.xf266856f631ec016.xc44f2b7498b700f7(Object xe0292b9ed559da7d, EventArgs xfbf34718e704c6bc)
   at TD.SandBar.ToolbarItemBase.OnActivate()
   at TD.SandBar.ButtonItemBase.OnActivate()
   at TD.SandBar.ButtonItem.OnActivate()
   at TD.SandBar.ToolBar.OnItemRelease(ToolbarItemBase item, Point position)
   at TD.SandBar.ToolBar.OnMouseUp(MouseEventArgs e)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at TD.SandBar.ToolBar.WndProc(Message& m)
   at RightEdgeUI.CustomToolBar.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativewindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativewindow.WndProc(Message& m)
   at System.Windows.Forms.Nativewindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Posted Monday February 16 2009
1.  I am not running navigator along.  I am aware of only one connection and one moComMgr object object to be used.

2. I am using two different accounts for feed and broker - both MBT.

3. Are you planning to create a singleton class instead of a service?  Singleton would serve you better. 

Basically I am stuck and unless RE fixes this, I cannot use MBT.  What is the timeline for the proxy to be available?  Thanks.

MB Trading only allows one connection.  So if you have Navigator running when running RightEdge, this would cause this problem.  Also, if you have MBT for your data provider and broker within RightEdge this could also cause the problem since broker and data are separate.  We're working on a connection proxy that will allow you to use RE & MBT as both data and broker, but it won't help the Navigator & RE scenario.  You may want to get with MBT to change their policy.

Posted Monday February 16 2009
Wait, if you're using two different accounts, you should be OK.  You may need to create two services (one broker, one data) and enter the two account #'s.

Note: We're not the only option here, you could also communicate this with MBT since they impose the limitation.

atul (2/16/2009)
1.  I am not running navigator along.  I am aware of only one connection and one moComMgr object object to be used.

2. I am using two different accounts for feed and broker - both MBT.

3. Are you planning to create a singleton class instead of a service?  Singleton would serve you better. 

Basically I am stuck and unless RE fixes this, I cannot use MBT.  What is the timeline for the proxy to be available?  Thanks.

MB Trading only allows one connection.  So if you have Navigator running when running RightEdge, this would cause this problem.  Also, if you have MBT for your data provider and broker within RightEdge this could also cause the problem since broker and data are separate.  We're working on a connection proxy that will allow you to use RE & MBT as both data and broker, but it won't help the Navigator & RE scenario.  You may want to get with MBT to change their policy.

Posted Monday February 16 2009
Yes, tried various combinations:

1. Two accounts, set as two services --> live fails (all other works)

2. Three accounts, one for history, one for feed, one for broker --> live fails

3. Wrote my own History provider using MBT's new history service.  History plug in works great.  But live does not work.  --> live fails

4. Used the library you gave me, and followed instructions. --> live fails.

I observed that a "new" (MBTTickRetrieval) object is created on a separate application when we run Live.  Is that true?  Live run is a separate thread apartment or something?  Because there seems to be a problem with that model with MBT.

What is the expected timelines for the MBT Service or a fix?  Frankly, it shouldnt be that complicated.  I wrote an application on MBT separately, I used singleton object and all three works together: history, live feed, broker.  Please clarify this as our purchase of at least 3 licenses may depend on this.

Posted Monday February 16 2009
Realistically, this is a feature over a "fix" on our part.  I certainly invite you to tackle it if this is a trivial task for you.  However, we're going about it differently so that it can be applied to all brokers that impose this limitation.  The flexibility and reuse will mean some additional development time.  There is no scheduled delivery date as of yet.

No plugin knows about another plugin.  This is good practice since data doesn't depend on broker and vice versa.  As a result though, we have to load each plugin independently.  It was a design decision that we still feel is sound.

I'm still concerned about why your broker connection consistently fails.  I'm beginning to think that we may have different revisions (once again) between MBT and RightEdge.  Can you give me the version of Navigator so that I can give it a look here and see if I can reproduce the behavior?

atul (2/16/2009)
Yes, tried various combinations:

1. Two accounts, set as two services --> live fails (all other works)

2. Three accounts, one for history, one for feed, one for broker --> live fails

3. Wrote my own History provider using MBT's new history service.  History plug in works great.  But live does not work.  --> live fails

4. Used the library you gave me, and followed instructions. --> live fails.

I observed that a "new" (MBTTickRetrieval) object is created on a separate application when we run Live.  Is that true?  Live run is a separate thread apartment or something?  Because there seems to be a problem with that model with MBT.

What is the expected timelines for the MBT Service or a fix?  Frankly, it shouldnt be that complicated.  I wrote an application on MBT separately, I used singleton object and all three works together: history, live feed, broker.  Please clarify this as our purchase of at least 3 licenses may depend on this.

Smile Posted Monday February 16 2009

I'm still concerned about why your broker connection consistently fails.  I'm beginning to think that we may have different revisions (once again) between MBT and RightEdge.  Can you give me the version of Navigator so that I can give it a look here and see if I can reproduce the behavior?

No, I have correct versions.  I double checked with your earlier notes and emails to me as well as the fix you mail me last week.

Realistically, this is a feature over a "fix" on our part.  I certainly invite you to tackle it if this is a trivial task for you.  However, we're going about it differently so that it can be applied to all brokers that impose this limitation. 

OK.  As a matter of fact, I fixed it for myself.  I had to rewrite the whole MBT Plugin for this matter.  Now my plugin supports 1) History Service 2)Live feed 3)Broker Service and 4)Database connection to store the tick/bar data to SQL database.  I wonder why would you let go so many MB customers that bounced back from RE because of the problem.

Now, my RE only asks for one set of login credentials.  I dont need two accounts anymore.

The flexibility and reuse will mean some additional development time. 

Yeah, I can see that.  But get it fast, you might be losing people left-right-center.

There is no scheduled delivery date as of yet.

ok.

No plugin knows about another plugin.  This is good practice since data doesn't depend on broker and vice versa.  As a result though, we have to load each plugin independently.  It was a design decision that we still feel is sound.

Yes, its a good design.  But feature's time to market is an important factor.


Edited: Tuesday February 17 2009 by Atul H
Posted Tuesday February 17 2009
<$0.02>
I feel I must speak up in defense of the RE crew's choice of priorities. The point, IMHO, of a framework provider is not to deliver the actual plugins, but to build a tool set and execution engine which provides the interfaces needed. I think it's fantastic that RE even attempts to provide some functional modules. However, "plugins" by their very nature are, for virtually all software, intended as 3rd party products.

If you have solved the MB problems, why don't you share your work so others can benefit? I chose this path with my broker plugin and have not regretted it.
</$0.02>

Cheers!
Mark
Posted Tuesday February 17 2009
That's outstanding!  Good work.


Similar Topics


Reading This Topic


2005-2017 © RightEdge Systems