Portfolio_InvestedCapital seems not to work

Questions about MultiCharts and user contributed studies.
rgranero
Posts: 56
Joined: 26 Jul 2010
Has thanked: 4 times
Been thanked: 1 time

Portfolio_InvestedCapital seems not to work

Postby rgranero » 20 Jun 2012

Hi, I would print Portfolio_InvestedCapital and then I did this signal:

if BarNumber=10 then buy 100000/c shares next bar at o;

if lastbaronchart then sell next bar at o;

print(Portfolio_InvestedCapital,";",getsymbolname,";",date);

I have applied it in portfolio backtestr to symbol NI and NEE to the last 100 bar from today.

In the outpot file I have:
5.75;NI;1120619.00
5.75;NEE;1120619.00

5.75 isn't the sum of all the position... The right would be 200.000,00 Anyone can help me?

Thanks
riccardo

rgranero
Posts: 56
Joined: 26 Jul 2010
Has thanked: 4 times
Been thanked: 1 time

Re: Portfolio_InvestedCapital seems not to work

Postby rgranero » 20 Jun 2012

I have just dicovered who 5.7 is the sum of the contracts of NI and NEE / 1000... why?

rgranero
Posts: 56
Joined: 26 Jul 2010
Has thanked: 4 times
Been thanked: 1 time

Re: Portfolio_InvestedCapital seems not to work

Postby rgranero » 20 Jun 2012

I just tried to buy 100 shares of NEE and 100 shares of NI and Portfolio_InvestedCapital was 0.2=(100+100)/1000. The sum of all the shares/1000.

The right would be the sum of the position in Usd like indicated by the manual.

I have just made the upgrade to the last version 8.0.5605.400.

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Portfolio_InvestedCapital seems not to work

Postby Henry MultiСharts » 20 Jun 2012

Hello Rgranero,

Please make sure Big Point Value for the instruments you are using is correct in QuoteManager->Edit Symbol->Settings tab.

In Portfolio Backtester on Portfolio Settings tab please set the Max potential loss to 100% and try to backtest again.

rgranero
Posts: 56
Joined: 26 Jul 2010
Has thanked: 4 times
Been thanked: 1 time

Re: Portfolio_InvestedCapital seems not to work

Postby rgranero » 21 Jun 2012

Ok, now works with setting in Max potential loss = 100%.

Well done, Portfolio_InvestedCapital and all the new global variable on Portfolio are very useful.

Thanks Henry!


Return to “MultiCharts”