Hi,
Using Patsystems as an example.
Is it possible to connect to account A broker A and account B broker B both using Patsystems? All from the one instance of Multicharts?
I can see that I can create two different Pats broker profiles. But I can't create two pats datafeeds, as the data source clone feature is for universal DDE only?? Is this right?
Many thanks!
Connecting to different accounts with same API. Possible?
- Dave Masalov
- Posts: 1712
- Joined: 16 Apr 2010
- Has thanked: 51 times
- Been thanked: 489 times
Re: Connecting to different accounts with same API. Possible
Hello wilkinsw,I can see that I can create two different Pats broker profiles. But I can't create two pats datafeeds, as the data source clone feature is for universal DDE only?? Is this right?
You are absolutely correct. You can create two Pats broker profiles connected to different accounts at different brokers, but the data feed connection can be configured to one of the account at a time. So it is not possible to connect data from two Pats accounts at the same time. Though, two simultaneous broker connections are possible.
Re: Connecting to different accounts with same API. Possible
How about symbol mapping:
Can I have two charts both with the same IQfeed symbol but.....
Chart1: mapped to "Patsystems1 Broker A Symbol". e.g. "qcl#c" to "Phy crude-Feb15"
Chart2: mapped to "Patsystems2 Broker B Symbol". e.g. "qcl#c" to "Ph CRDE - FEB15"
Is this possible? Note that different brokers will use symbol names which vary to other brokers (if that makes a difference, as depicted here).
Can I have two charts both with the same IQfeed symbol but.....
Chart1: mapped to "Patsystems1 Broker A Symbol". e.g. "qcl#c" to "Phy crude-Feb15"
Chart2: mapped to "Patsystems2 Broker B Symbol". e.g. "qcl#c" to "Ph CRDE - FEB15"
Is this possible? Note that different brokers will use symbol names which vary to other brokers (if that makes a difference, as depicted here).
- Dave Masalov
- Posts: 1712
- Joined: 16 Apr 2010
- Has thanked: 51 times
- Been thanked: 489 times
Re: Connecting to different accounts with same API. Possible
The configuration that you described should work fine as long as Symbol Mapping is configured correctly.
Re: Connecting to different accounts with same API. Possible
So say symbol "Phy crude-Feb15" is from Patsystems1 which is also a connected data source. Say "Ph CRDE - FEB15" is the same instrument but on Patsystems2 which is NOT a connected data source.
Will firing orders to the broker's "Ph CRDE - FEB15" symbol generate any errors, if it's data is not connected?
Thanks!
Will firing orders to the broker's "Ph CRDE - FEB15" symbol generate any errors, if it's data is not connected?
Thanks!
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: Connecting to different accounts with same API. Possible
Hello wilkinsw,
There should be no issues with such setup.
If Asks and Bids are not provided for the connected broker (not related to data provider connection) then you need to set the Get Real-Time Data: from Chart.
There should be no issues with such setup.
If Asks and Bids are not provided for the connected broker (not related to data provider connection) then you need to set the Get Real-Time Data: from Chart.
Re: Connecting to different accounts with same API. Possible
Thanks Henry.
How about bottlenecks?
If I'm connected to two different Pats API accounts, does that mean all orders get queued through the one Pats plugin?
How about bottlenecks?
If I'm connected to two different Pats API accounts, does that mean all orders get queued through the one Pats plugin?
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: Connecting to different accounts with same API. Possible
That is correct.If I'm connected to two different Pats API accounts, does that mean all orders get queued through the one Pats plugin?
One trading plugin can process 1 order per time. It means all orders that are generated by the strategies are put into a queue and sent one by one to the API. Once one order is sent, the trading engine starts sending the next order. That is not technically possible to send two orders simultaneously to one API.
If there are two APIs (two different brokers) – then two orders can be sent almost at the same time.
In order to perform such high speed calculations you need a CPU with 4 cores or more.
Each chart with a strategy will get one flow.
Each trading instance will get one flow.
4 cores can get 1 flow each and supply parallel calculation.
But if you have a single broker profile then the amount of cores you have will not help to process the orders faster.
Re: Connecting to different accounts with same API. Possible
Ok Henry, I see what you're saying.
Technically then, two different brokers using the same order routing platforms (e.g. Patsystems in this case) each with their own different trade and price server IP addresses should make it technically possible to route in parallel, as they only share the name "Patsystems" in common and nothing else.
I guess the issue is needing to create a second plugin instance??
If this is technically possible, then let me know and I'll put in a request into project management. The need to create multiple plugin instances would also effect platforms like TT, Rithmic etc when connected to multiple brokers sharing the same routing platform.
On the other hand, I suppose an option is to rent another server and purchase another Multicharts license.
Technically then, two different brokers using the same order routing platforms (e.g. Patsystems in this case) each with their own different trade and price server IP addresses should make it technically possible to route in parallel, as they only share the name "Patsystems" in common and nothing else.
I guess the issue is needing to create a second plugin instance??
If this is technically possible, then let me know and I'll put in a request into project management. The need to create multiple plugin instances would also effect platforms like TT, Rithmic etc when connected to multiple brokers sharing the same routing platform.
On the other hand, I suppose an option is to rent another server and purchase another Multicharts license.
Re: Connecting to different accounts with same API. Possible
Henry, I have some questions on this topic.
I understand that it is not possible to process orders simultaneously and that there is some serialization with one trading plugin. I am trying to understand the degree of serialization. Lets say 2 charts with symbols A and B trading with 1 minute resolution had buy orders at end of same 1 minute interval. The order engine sends order A to broker. Does it wait for broker to acknowledge receipt of order A before sending order B or does it send order B as soon as order A is out from its queue?
2. Can you also please clarify/define what you mean by "trading instance"? Is trading instance the same as a "broker API connection" or is it "a single chart" or is it "a group of charts with a common plugin"?
Thanks.
One trading plugin can process 1 order per time. It means all orders that are generated by the strategies are put into a queue and sent one by one to the API. Once one order is sent, the trading engine starts sending the next order. That is not technically possible to send two orders simultaneously to one API.
I understand that it is not possible to process orders simultaneously and that there is some serialization with one trading plugin. I am trying to understand the degree of serialization. Lets say 2 charts with symbols A and B trading with 1 minute resolution had buy orders at end of same 1 minute interval. The order engine sends order A to broker. Does it wait for broker to acknowledge receipt of order A before sending order B or does it send order B as soon as order A is out from its queue?
1. Can you please clarify/define what you mean by "flow"? Does flow mean "thread for computing the chart strategy" or does flow mean "TCP flow" since presumably the broker connection is over TCP and you are constrained to one TCP connection with broker?If there are two APIs (two different brokers) – then two orders can be sent almost at the same time. Each chart with a strategy will get one flow. Each trading instance will get one flow. 4 cores can get 1 flow each and supply parallel calculation. But if you have a single broker profile then the amount of cores you have will not help to process the orders faster.
2. Can you also please clarify/define what you mean by "trading instance"? Is trading instance the same as a "broker API connection" or is it "a single chart" or is it "a group of charts with a common plugin"?
Thanks.
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: Connecting to different accounts with same API. Possible
There is a single instance of trading engine that pushes the orders to the APIs. That is not technically possible to have two instances of it.Ok Henry, I see what you're saying.
Technically then, two different brokers using the same order routing platforms (e.g. Patsystems in this case) each with their own different trade and price server IP addresses should make it technically possible to route in parallel, as they only share the name "Patsystems" in common and nothing else.
I guess the issue is needing to create a second plugin instance??
If this is technically possible, then let me know and I'll put in a request into project management. The need to create multiple plugin instances would also effect platforms like TT, Rithmic etc when connected to multiple brokers sharing the same routing platform.
Two PATS/Rithmic broker profiles with different settings will bring up two API instances for sending orders.
For ТТ orders will go through one process.
Yes, that is possible.On the other hand, I suppose an option is to rent another server and purchase another Multicharts license.
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: Connecting to different accounts with same API. Possible
Each chart has his own trading instance for processing the orders. So order A and B from different charts do not know about one another and are being sent independently.Henry, I have some questions on this topic.
One trading plugin can process 1 order per time. It means all orders that are generated by the strategies are put into a queue and sent one by one to the API. Once one order is sent, the trading engine starts sending the next order. That is not technically possible to send two orders simultaneously to one API.
I understand that it is not possible to process orders simultaneously and that there is some serialization with one trading plugin. I am trying to understand the degree of serialization. Lets say 2 charts with symbols A and B trading with 1 minute resolution had buy orders at end of same 1 minute interval. The order engine sends order A to broker. Does it wait for broker to acknowledge receipt of order A before sending order B or does it send order B as soon as order A is out from its queue?
By "flow" I was referring to "thread for computing".1. Can you please clarify/define what you mean by "flow"? Does flow mean "thread for computing the chart strategy" or does flow mean "TCP flow" since presumably the broker connection is over TCP and you are constrained to one TCP connection with broker?If there are two APIs (two different brokers) – then two orders can be sent almost at the same time. Each chart with a strategy will get one flow. Each trading instance will get one flow. 4 cores can get 1 flow each and supply parallel calculation. But if you have a single broker profile then the amount of cores you have will not help to process the orders faster.
Trading instance is a thread for computing that manages the orders for a given chart (pushes them to the API, modifies/cancels orders).2. Can you also please clarify/define what you mean by "trading instance"? Is trading instance the same as a "broker API connection" or is it "a single chart" or is it "a group of charts with a common plugin"?
Re: Connecting to different accounts with same API. Possible
Henry, how is this handled in the PT where there is only one broker plugin? Say strategies for symbols A, B, C generate orders on same bar close at 10:35:05 on 5 second resolution data. Two questions:Trading instance is a thread for computing that manages the orders for a given chart (pushes them to the API, modifies/cancels orders).
1. I assume that since there is only one plugin, the orders are serialized. Correct?
2. If they are serialized, can you clarify the degree of serialization in the order engine. After sending order A, does the order engine wait for broker ack for A before processing order B or does it fire the orders one after the other without waiting for acks?
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: Connecting to different accounts with same API. Possible
Portfolio works similar to charts - each strategy (each data1 instrument) has his own trading instance for processing the orders. So orders from different strategies do not know about one another and are being sent independently. Order acknowledgement comes asynchronously, so it can be before sending the next order or after that.Henry, how is this handled in the PT where there is only one broker plugin? Say strategies for symbols A, B, C generate orders on same bar close at 10:35:05 on 5 second resolution data. Two questions:Trading instance is a thread for computing that manages the orders for a given chart (pushes them to the API, modifies/cancels orders).
1. I assume that since there is only one plugin, the orders are serialized. Correct?
2. If they are serialized, can you clarify the degree of serialization in the order engine. After sending order A, does the order engine wait for broker ack for A before processing order B or does it fire the orders one after the other without waiting for acks?