Hello,
I am running some system tests and I am trying to find a way to trade multiple accounts. Basically slave several accounts to the master . I connect through Rithmic (R Trader Pro). I enter position through the MultiCharts DOM or Price Ladder. Ideally I would like to enter on the master through the PL (Price Ladder) and the slave to the other accounts in Rithmic. Does anyone have some ideas?
Thanks
Trade Copier
- Polly MultiCharts
- Posts: 203
- Joined: 20 Jul 2022
- Has thanked: 1 time
- Been thanked: 56 times
Re: Trade Copier
Hello Wnorton,
It is possible to connect the MultiCharts platform to different accounts, from different brokers.
But placing an order simultaneously to all accounts is not supported for manual trading and not supported in MultiCharts PowerLanguage for auto trading.
It is possible to achieve it in MultiCharts .NET if you code a script using an unmanaged orders approach. It means that you do not need to have an actual chart or data to get the signal calculated. You only need to have the broker profile connected and a script that will generate and monitor your order (trace its status, modify or cancel it). Of course there should be a chart in order to apply a strategy for it, but from this single chart you can trade multiple different instruments at different brokers simultaneously.
Unmanaged orders are managed by the user commands only. They are not handled by MultiCharts Auto trading engine as regular strategy orders.
Here is a sample C# script that shows how it can be implemented.
It is possible to connect the MultiCharts platform to different accounts, from different brokers.
But placing an order simultaneously to all accounts is not supported for manual trading and not supported in MultiCharts PowerLanguage for auto trading.
It is possible to achieve it in MultiCharts .NET if you code a script using an unmanaged orders approach. It means that you do not need to have an actual chart or data to get the signal calculated. You only need to have the broker profile connected and a script that will generate and monitor your order (trace its status, modify or cancel it). Of course there should be a chart in order to apply a strategy for it, but from this single chart you can trade multiple different instruments at different brokers simultaneously.
Unmanaged orders are managed by the user commands only. They are not handled by MultiCharts Auto trading engine as regular strategy orders.
Here is a sample C# script that shows how it can be implemented.
Re: Trade Copier
Hi Polly,
Do you plan to implement a trader copier in the future, for multicharts (not net) ?
Thanks
Do you plan to implement a trader copier in the future, for multicharts (not net) ?
Thanks
Hello Wnorton,
It is possible to connect the MultiCharts platform to different accounts, from different brokers.
But placing an order simultaneously to all accounts is not supported for manual trading and not supported in MultiCharts PowerLanguage for auto trading.
It is possible to achieve it in MultiCharts .NET if you code a script using an unmanaged orders approach. It means that you do not need to have an actual chart or data to get the signal calculated. You only need to have the broker profile connected and a script that will generate and monitor your order (trace its status, modify or cancel it). Of course there should be a chart in order to apply a strategy for it, but from this single chart you can trade multiple different instruments at different brokers simultaneously.
Unmanaged orders are managed by the user commands only. They are not handled by MultiCharts Auto trading engine as regular strategy orders.
Here is a sample C# script that shows how it can be implemented.
- Polly MultiCharts
- Posts: 203
- Joined: 20 Jul 2022
- Has thanked: 1 time
- Been thanked: 56 times
Re: Trade Copier
Flow,
At the moment this feature is not on our roadmap but I have forwarded your suggestion to the dev team.
At the moment this feature is not on our roadmap but I have forwarded your suggestion to the dev team.
-
- Posts: 18
- Joined: 19 Dec 2023
- Has thanked: 1 time
Re: Trade Copier
Hello Everyone
I have written multiple Trade Copiers in Multicharts.
They are written in Pwerlanguage so anyone can customise them.
You simply need to run your strategy in Portfolio Trader As Strategy1.
Then You Keep Adding Strategies and configure a differenct account. for STrategy 2 ,3 ,4 ,5 and so on.
All trades from Strategy 1 are copied to the accounts of Strategy 2,3,4,5 etc. (within a User Defined Time Limit 1 second to as long as you want)
I have used the above setup for years managing multiple institutional accounts
DM me for more details.
I have written multiple Trade Copiers in Multicharts.
They are written in Pwerlanguage so anyone can customise them.
You simply need to run your strategy in Portfolio Trader As Strategy1.
Then You Keep Adding Strategies and configure a differenct account. for STrategy 2 ,3 ,4 ,5 and so on.
All trades from Strategy 1 are copied to the accounts of Strategy 2,3,4,5 etc. (within a User Defined Time Limit 1 second to as long as you want)
I have used the above setup for years managing multiple institutional accounts
DM me for more details.
- Smoky
- Posts: 518
- Joined: 03 Dec 2010
- Location: Thailand
- Has thanked: 99 times
- Been thanked: 123 times
Re: Trade Copier
Realy easy to do this, you have your main signal in a chart and use globalVariables.dll to share your signal in other slave chart !
one slave chart, your signal code is waiting a globalvariables change to send order to the broker...
one slave chart, your signal code is waiting a globalvariables change to send order to the broker...
Re: Trade Copier
I actually prefer using the Pmms and pmm keywords because i found them more stable than Global vairables.
Plus you can use pmm and pmms variables them in backtesting also.
You can refer to the attached Master Slave .pws setup
Use it as is. Do not change the settings otherwise it will not work.
ALso note, not only does the signal copy orders from the Master Account to the Salve account. But Also, synchonizes the Broker Position for Master Accounts with that of the Strategy in the Master Account.
You can copy a combined signal (i.e. the Net Market Position ) of all the master strategies into the Slave account within a User Defined Timeout.
The Master Account needs to run in Async Mode.
The Slave account needs to run with Sync Mode.
!MP Binance syncAT Portfolio Ch_test Elk_iboff This is the Master Signal Synchroniser plus sets the position for the Slave Account to copy.
You can have N Number of Master Strategies running. ( I Have configured it to run 2 Master Strategies) in 2 seperte accounts.
The master Strategies need to run with Async mode.
Definition of Inputs :
Name your master signal with the Input word MasterAccnt
You Can configure the latencies using the following which are in Milliseconds:
InnerMP_TimeOutMS,InnerMP_LatencyMS,Broker_TimeOutMS,Broker_LatencyMS
MasterSlave :
If you want to ONLY Syncronize the Broker Position from Master Strategy set this to False.
If you want to Syncronize the Broker Position from Master Strategy to the Master Broker Account AND copy orders to the Slave Account then set this to True.
Printlog Print Function For debugging. Dont use True in live trading it will crash after few hours.
FillAlert (false),
ReCalcOnCalReason, The strategy uses a lot of RecalcLastBar Commands which can be very CPU intensive
If the above setup is too CPU intensive for your PC. Then set this Input to True. Else Set it to False. By Setting it to True you only trigeger the RecalcLastBar command when there is a position mismatch.
BarInttoSec(3600), Just a simple input to define number of signals in the bar that you trade to alert you for any data outage during live trading. SInce I use 1 hour bars i have configured it to 3600seconds.
Max_Order_Count :Sometimes there are tech glitches so the Strategy does not send more than "Max_Order_Count" Orders.
!MP Binance syncAT Portfolio Ch_test_Slave : This is used to Copy trades from the Master Account to Salve Account.
Definition of Inputs :
MasterAccnt1 : string namethat you named your Master 1 strategy - - used to retrieve the market position from Master 1
MasterAccnt2: string namethat you named your Master 2 strategy - used to retrieve the market position from Master 2
AccountMult1: Used to Scale the positions from Your Master to Salve Account. Whenther your want to multiply the Master Position by this multiplier.
AccountMult2, Same as above but for Master 2.
Is_Last_Slave_Accnt IMPORTANT : this needs to be set as False for every Slave Account in the List of Accounts in Portfolio Tree except for the Last Slave Account in the list of Slave accounts in Portfolio Tree. Set to True in the last slace account.
SlaveAccnt : Just a string name name for your Slave account used for Alerts:
The rest of the inputs funciton similar to those in !MP Binance syncAT Portfolio Ch_test Elk_iboff
Hope this helps
Let me know if any questions
Plus you can use pmm and pmms variables them in backtesting also.
You can refer to the attached Master Slave .pws setup
Use it as is. Do not change the settings otherwise it will not work.
ALso note, not only does the signal copy orders from the Master Account to the Salve account. But Also, synchonizes the Broker Position for Master Accounts with that of the Strategy in the Master Account.
You can copy a combined signal (i.e. the Net Market Position ) of all the master strategies into the Slave account within a User Defined Timeout.
The Master Account needs to run in Async Mode.
The Slave account needs to run with Sync Mode.
!MP Binance syncAT Portfolio Ch_test Elk_iboff This is the Master Signal Synchroniser plus sets the position for the Slave Account to copy.
You can have N Number of Master Strategies running. ( I Have configured it to run 2 Master Strategies) in 2 seperte accounts.
The master Strategies need to run with Async mode.
Definition of Inputs :
Name your master signal with the Input word MasterAccnt
You Can configure the latencies using the following which are in Milliseconds:
InnerMP_TimeOutMS,InnerMP_LatencyMS,Broker_TimeOutMS,Broker_LatencyMS
MasterSlave :
If you want to ONLY Syncronize the Broker Position from Master Strategy set this to False.
If you want to Syncronize the Broker Position from Master Strategy to the Master Broker Account AND copy orders to the Slave Account then set this to True.
Printlog Print Function For debugging. Dont use True in live trading it will crash after few hours.
FillAlert (false),
ReCalcOnCalReason, The strategy uses a lot of RecalcLastBar Commands which can be very CPU intensive
If the above setup is too CPU intensive for your PC. Then set this Input to True. Else Set it to False. By Setting it to True you only trigeger the RecalcLastBar command when there is a position mismatch.
BarInttoSec(3600), Just a simple input to define number of signals in the bar that you trade to alert you for any data outage during live trading. SInce I use 1 hour bars i have configured it to 3600seconds.
Max_Order_Count :Sometimes there are tech glitches so the Strategy does not send more than "Max_Order_Count" Orders.
!MP Binance syncAT Portfolio Ch_test_Slave : This is used to Copy trades from the Master Account to Salve Account.
Definition of Inputs :
MasterAccnt1 : string namethat you named your Master 1 strategy - - used to retrieve the market position from Master 1
MasterAccnt2: string namethat you named your Master 2 strategy - used to retrieve the market position from Master 2
AccountMult1: Used to Scale the positions from Your Master to Salve Account. Whenther your want to multiply the Master Position by this multiplier.
AccountMult2, Same as above but for Master 2.
Is_Last_Slave_Accnt IMPORTANT : this needs to be set as False for every Slave Account in the List of Accounts in Portfolio Tree except for the Last Slave Account in the list of Slave accounts in Portfolio Tree. Set to True in the last slace account.
SlaveAccnt : Just a string name name for your Slave account used for Alerts:
The rest of the inputs funciton similar to those in !MP Binance syncAT Portfolio Ch_test Elk_iboff
Hope this helps
Let me know if any questions
- Attachments
-
- Master slave setup.pws
- (652 KiB) Downloaded 29 times
-
- MC Master Slave.pla
- (101.53 KiB) Downloaded 27 times