Limit the numer of contracts with different strategies and workspace

Questions about MultiCharts and user contributed studies.
fede.adv
Posts: 7
Joined: 08 Sep 2017

Limit the numer of contracts with different strategies and workspace

Postby fede.adv » 06 Feb 2018

Hello everybody,
I’d like to have some clarifications about a problem I can not solve.
How can I get the broker position on a specific instrument?
I use three different strategies on ES with three different workspace.
I want to limit my exposure and do not allow them to entry in the same direction.
Any suggestion?
Thank You in advance
Fede.adv

User avatar
Anna MultiCharts
Posts: 560
Joined: 14 Jul 2017
Has thanked: 42 times
Been thanked: 140 times

Re: Limit the numer of contracts with different strategies and workspace

Postby Anna MultiCharts » 06 Feb 2018

Hello, fede.adv!

In autotrading you can use the MarketPosition_at_Broker_for_The_Strategy keyword for this purpose: it returns a numerical value, indicating the number of contracts and the type of position at the broker for the strategy. Please keep in mind that the resulted value will not coincide with the real position at broker.
For more information please refer to the Help of PowerLanguage Editor.

fede.adv
Posts: 7
Joined: 08 Sep 2017

Re: Limit the numer of contracts with different strategies and workspace

Postby fede.adv » 06 Feb 2018

thank You Svetlana, I think I have to work on it.

If I have two dailiy strategy and a 30 minute strategy on ES, I'd like to have (and backtest, of course) a signal or indicator that tells me how many contract I have in portfolio and, in case, limits my exporure at the market.
Is this keyword useful for my purpose?

User avatar
Anna MultiCharts
Posts: 560
Joined: 14 Jul 2017
Has thanked: 42 times
Been thanked: 140 times

Re: Limit the numer of contracts with different strategies and workspace

Postby Anna MultiCharts » 09 Feb 2018

fede.adv,

The strategy on each chart knows about the amount of contracts on it. You can use Global Variables to establish the connection between the charts and use some indicator that will calculate the total amount of contracts for this symbol:
https://www.multicharts.com/trading-sof ... _Variables
There’s no special keyword for this purpose.


Return to “MultiCharts”