Programatically disabling/enabling trading for all Signals

Questions about MultiCharts .NET and user contributed studies.
sylfvdk
Posts: 57
Joined: 06 Dec 2005

Programatically disabling/enabling trading for all Signals

Postby sylfvdk » 15 Apr 2015

Hi,
1. Is that possible to disable generating of all orders coming from enabled signals programmatically (let's say from another Signal 'my Signal'). Is there any internal variable that we can set to stop trading for a while?

2. If I want all enabled Signals work from 11 AM to 3:59 (for US Stocks) - how I can do that without changing Session parameters. If I change Session from 11-3:59 - data before 11 is not coming into Chart and calculations based on Length of previous bars are taking from yesterdays values instead of today's morning values?

Obviously, I don't want to program all the Signals I use individually. Looking to find common solution.

These 2 questions will probably have the same answer.

Thanks, Victor

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Programatically disabling/enabling trading for all Signa

Postby Henry MultiСharts » 21 Apr 2015

Hello Victor,

Let me answer your questions in order:
1) There is no such variable. By default signals/charts do not talk to each other. You can make them communicate using one of the following methods. Since MultiCharts 9.0 that is possible to control trading of different strategies/symbols from the Portfolio Money Management Signal. Please see Portfolio Trader for more information.
2) If you are looking for a common solution then the answer is the same - Portfolio Money Management Signal.

User avatar
JoshM
Posts: 2195
Joined: 20 May 2011
Location: The Netherlands
Has thanked: 1544 times
Been thanked: 1565 times
Contact:

Re: Programatically disabling/enabling trading for all Signa

Postby JoshM » 30 Apr 2015

Besides using the Portfolio Trader (see Henry's reply above), you can also use the Command Line (`ChartCommands.CommandLine()`) to disable trading on a specific chart. For that, the signal needs to call the Command Line method with the ".at_toggle" parameter.

There's an example of that here: toggle auto-trading programmatically.


Return to “MultiCharts .NET”