Page 1 of 1

MarketPosition_at_Broker_for_The_Strategy

Posted: Nov 27 2023
by Kf25
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.

Re: MarketPosition_at_Broker_for_The_Strategy

Posted: Nov 29 2023
by Polly MultiCharts
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.

Re: MarketPosition_at_Broker_for_The_Strategy

Posted: Dec 07 2023
by Kf25
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,

Re: MarketPosition_at_Broker_for_The_Strategy

Posted: Dec 08 2023
by Polly MultiCharts
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.