Active workspace name from Signal?

Questions about MultiCharts .NET and user contributed studies.
Ram
Posts: 90
Joined: 25 Nov 2014
Has thanked: 17 times
Been thanked: 5 times

Active workspace name from Signal?

Postby Ram » 01 Mar 2015

Hi,

I'm using the same signal in two different workspaces at the same time for some testing, that signal is updating an un depended floating window with real time status for some conditions, for visual example:
Image

when switching between one workspace to the other i need to know which of the workspaces is active so just relevant signal will update the floating window.

My question is how to get the name of the active workspace from the signal code?

Thank you in advance,
Best,
R.

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

Re: Active workspace name from Signal?

Postby JoshM » 02 Mar 2015

My question is how to get the name of the active workspace from the signal code?
If you're auto-trading, you could use the TradeManager to retrieve the `Workspace` property from the `Order` class.

Alternatively, `Environment.ChartWindowHWND` returns the window handle of the chart to which the study is applied (which is unique for each chart, and so can be used to differentiate between workspaces).

Ram
Posts: 90
Joined: 25 Nov 2014
Has thanked: 17 times
Been thanked: 5 times

Re: Active workspace name from Signal?

Postby Ram » 02 Mar 2015

My question is how to get the name of the active workspace from the signal code?
If you're auto-trading, you could use the TradeManager to retrieve the `Workspace` property from the `Order` class.

Alternatively, `Environment.ChartWindowHWND` returns the window handle of the chart to which the study is applied (which is unique for each chart, and so can be used to differentiate between workspaces).
Hi Josh,

I do use auto trading however I use it in both workspaces with the same signal so that won't fly :)

I'll check the Environment.ChartWindowHWND it does look promising!
Thx much!


Return to “MultiCharts .NET”