Portfolio Trader Flag  [SOLVED]

Questions about MultiCharts and user contributed studies.
idodo
Posts: 15
Joined: 28 May 2019
Has thanked: 6 times

Portfolio Trader Flag

Postby idodo » 10 Jan 2022

Hi,

When using a "Pmms..." functions in a signal while backtesting in a portfolio everything is fine.
When running the same signal on the chart (without portfolio) than I get an error that this function is not supported.
Now, I understand that it is not supported, that's fine.
I am just looking for a flag that will indicate that it is running on PortfolioTrader or not.
And then I could write somthing like:

if PortfolioTraderMode = True then
(Use PMMS functions)
else
Do something else;

The only option I could find is to add an Input to the Signal and in the Portfolio to set it to "True" and in the Chart to set it to "False"
But it is not the best thing to do.
Is there a built in Flag that indicates that the signal is running on a Chart or Portfolio?

Thanks
Ido

User avatar
ABC
Posts: 718
Joined: 16 Dec 2006
Location: www.abctradinggroup.com
Has thanked: 125 times
Been thanked: 408 times
Contact:

Re: Portfolio Trader Flag

Postby ABC » 11 Jan 2022

Hi Ido,

GetAppInfo( aiApplicationType ) appears to be what you are looking for.
Usage
GetAppInfo(Attribute)

Parameters
aiApplicationType - identifies the calling application:

0 = Unknown

1 = Chart

2 = Scanner

10 = Portfolio Trader
Regards,

ABC

idodo
Posts: 15
Joined: 28 May 2019
Has thanked: 6 times

Re: Portfolio Trader Flag  [SOLVED]

Postby idodo » 17 Jan 2022

Hi ABC,

That is exactly what I was looking for.
Thanks!

Ido


Return to “MultiCharts”