MarketPosition_at_Broker_for_The_Strategy

Questions about MultiCharts and user contributed studies.
Kf25
Posts: 2
Joined: 24 Nov 2023

MarketPosition_at_Broker_for_The_Strategy

Postby Kf25 » 27 Nov 2023

Hi,

I want to run multiple automated trading strategies on a single chart in MultiCharts. So I tried using the following two keywords of powerlanguage to access the strategy specific market position and the average entry price.

MarketPosition_at_Broker_for_The_Strategy
AvgEntryPrice_at_Broker_for_The_Strategy

But they return 0 in almost all the cases, even when they should return a non-zero value. I've done backtests as well as live tests on a demo account and the results were the same. Note, I've enabled IntraBarOrderGeneration for these strategies.

Please let me know how to access these values reliably.

Thank you.

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

Re: MarketPosition_at_Broker_for_The_Strategy

Postby Polly MultiCharts » 29 Nov 2023

Hello Kf25,

These keywords will work only when Auto Trading is enabled. In backtesting these keywords will return 0.
You might test these keywords in trading using the pre-built Paper Trader.
When auto trading these keywords will return the values from the Order and Position Tracker → Strategy Position tab. If you’re not combining manual and auto trading, and the position at the broker was opened by auto trading in MultiCharts only, then the Strategy Position will match Broker Position in the Order and Position Tracker.

Kf25
Posts: 2
Joined: 24 Nov 2023

Re: MarketPosition_at_Broker_for_The_Strategy

Postby Kf25 » 07 Dec 2023

Hi Polly,

We tried the above already and had the same results. While troubleshooting, we tried to enable the feature "Enable Automated Order Execution for Multiple Charts" and received the message: Fast AT Switch. Access Denied. Is this related to the broker or data source I am using? And is there someone from MultiCharts who could help troubleshoot this issue hands on or someone who has successfully traded multiple strategies on multiple charts for a single instrument, so that we can confirm that this in fact is not a keyword issue.

Thanks,

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

Re: MarketPosition_at_Broker_for_The_Strategy

Postby Polly MultiCharts » 08 Dec 2023

Kf25,

‘Enable Automated Order Execution for Multiple Charts’ is a tool that enables the auto trading on all the charts at once, so that you don't have to enable them manually one by one. If your license doesn’t include Advanced Strategy Pack, this option will not be available. For more info about this feature please see this page.
If you’re planning to trade on multiple charts for one instrument, please refer to this article.


Return to “MultiCharts”