Keyword for Application Type ?

Questions about MultiCharts and user contributed studies.
Aston01
Posts: 21
Joined: 24 Oct 2013

Keyword for Application Type ?

Postby Aston01 » 13 Nov 2013

Is there a way to identify whether code is running in the MultiCharts environment or the Portfolio Backtester ?

Currently I use 2 different versions to accommodate the variations between the platforms with things like "CurrentEntries" and "Portfolio_CurrentEntries" and I would like to be able to code a switch to adjust to those variations based on the platform being used.

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

Re: Keyword for Application Type ?

Postby ABC » 14 Nov 2013

Aston01,
you can use GetAppInfo(aiApplicationType). In the Portfolio Backtester it returns 10 here on a chart it will return 1.

You need to see if this works for you. This code raises an error on a chart:

Code: Select all

Value1 = Portfolio_NetProfit;
and this code won't:

Code: Select all

if GetAppInfo(aiApplicationType) = 10 then
Value1 = Portfolio_NetProfit;
Regards,
ABC


Return to “MultiCharts”