Trade Copier

Questions about MultiCharts and user contributed studies.
Wnorton
Posts: 1
Joined: 08 Dec 2022

Trade Copier

Postby Wnorton » 15 Nov 2023

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

User avatar
Polly MultiCharts
Posts: 203
Joined: 20 Jul 2022
Has thanked: 1 time
Been thanked: 55 times

Re: Trade Copier

Postby Polly MultiCharts » 16 Nov 2023

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.

Flow
Posts: 8
Joined: 14 Feb 2024
Has thanked: 1 time

Re: Trade Copier

Postby Flow » 27 Feb 2024

Hi Polly,

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.

User avatar
Polly MultiCharts
Posts: 203
Joined: 20 Jul 2022
Has thanked: 1 time
Been thanked: 55 times

Re: Trade Copier

Postby Polly MultiCharts » 27 Feb 2024

Flow,

At the moment this feature is not on our roadmap but I have forwarded your suggestion to the dev team.

Flow
Posts: 8
Joined: 14 Feb 2024
Has thanked: 1 time

Re: Trade Copier

Postby Flow » 28 Feb 2024

Thanks

labratno9
Posts: 1
Joined: 04 Jan 2012
Has thanked: 1 time

Re: Trade Copier

Postby labratno9 » 29 Feb 2024

I second that request

svfutures24
Posts: 16
Joined: 19 Dec 2023
Has thanked: 1 time

Re: Trade Copier

Postby svfutures24 » 13 Mar 2024

Would be an epic feature to have for sure!

Nevik
Posts: 24
Joined: 20 Dec 2009
Location: Los Angeles, CA
Has thanked: 9 times
Been thanked: 1 time

Re: Trade Copier

Postby Nevik » 21 Mar 2024

I would say Trade copier is a must have feature if you are trading with a prop firm.

User avatar
BB123
Posts: 68
Joined: 24 Nov 2023
Has thanked: 22 times
Been thanked: 10 times

Re: Trade Copier

Postby BB123 » 22 Mar 2024

That would be a neat feature.. Though i wouldn't use it right now-- would be nice to have for the future..

amw_775
Posts: 23
Joined: 19 Apr 2020
Has thanked: 1 time
Been thanked: 12 times

Re: Trade Copier

Postby amw_775 » 22 Mar 2024

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.

amw_775
Posts: 23
Joined: 19 Apr 2020
Has thanked: 1 time
Been thanked: 12 times

Re: Trade Copier

Postby amw_775 » 22 Mar 2024

However its only compaitble with Market Orders

User avatar
Smoky
Posts: 518
Joined: 03 Dec 2010
Location: Thailand
Has thanked: 99 times
Been thanked: 121 times

Re: Trade Copier

Postby Smoky » 22 Mar 2024

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...

amw_775
Posts: 23
Joined: 19 Apr 2020
Has thanked: 1 time
Been thanked: 12 times

Re: Trade Copier

Postby amw_775 » 23 Mar 2024

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
Attachments
Master slave setup.pws
(652 KiB) Downloaded 26 times
MC Master Slave.pla
(101.53 KiB) Downloaded 24 times

Flow
Posts: 8
Joined: 14 Feb 2024
Has thanked: 1 time

Re: Trade Copier

Postby Flow » 11 Apr 2024

Thanks for the new answers guys, i'll check if i can use your ideas !


Return to “MultiCharts”