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.
Keyword for Application Type ?
- ABC
- Posts: 721
- Joined: 16 Dec 2006
- Location: www.abctradinggroup.com
- Has thanked: 125 times
- Been thanked: 408 times
- Contact:
Re: Keyword for Application Type ?
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:
and this code won't:
Regards,
ABC
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;
Code: Select all
if GetAppInfo(aiApplicationType) = 10 then
Value1 = Portfolio_NetProfit;
ABC