Page 1 of 1

Code question: Account Balance

Posted: May 07 2010
by Henrik
Maybe I have tomatoes on my eyes,
I can't find a command for code

- account balance
- account equity.

I need it to calculate Risk in my code.
Thank you!

Posted: May 07 2010
by Anastassia
Hi Henrik
The keyword for account balance is InitialCapital and for account equity is initialcapital + openpositionprofit + netprofit.
Here is the code example for last:

Code: Select all

var: _equity(0);
_equity = initialcapital + openpositionprofit + netprofit;
if (_equity < 100000) then buy next bar market;
Thank you

Posted: May 07 2010
by Henrik
Ah, thank you very much, Anastassia!

Posted: May 07 2010
by Anastassia
You are welcome Henrik
Have a nice weekend!

account balance??

Posted: May 10 2010
by NiC72
I feel like an idiot, what am I missing?
# The code need to check on my account balance.
# When I start up MC auto-trade the trading yesterday is gone.

How is it possible to check account balance?
Do you have to go in and change the Initial Capital manually every day?

Posted: May 11 2010
by janus
What!!!! Yet more hidden keywords? Is "initialcapital" documented in 6.0? Or do we have to resort to TS documentation to supplement the pathetically outdated documentation that's available for 5.5?

Posted: May 13 2010
by Anastassia
Hi all,

I am sorry i think i misunderstood the question. If you want to get the current account balance and account equity on Broker using keywords then it is not possible. We will implement this option in MultiCharts 7.0.

Thank you

Re: Code question: Account Balance

Posted: Oct 05 2010
by Adam333
I too greatly need to access account equity in order for my strategy to auto trade. What kind of timeframe are we looking at for the release of MultiCharts 7.0?

Thanks
Adam

Re: Code question: Account Balance

Posted: Oct 06 2010
by Dave Masalov
Dear Adam333,

MC 7.0 will be released most likely in the middle of November.

Re: Code question: Account Balance

Posted: Oct 06 2010
by Adam333
Great. Thanks Dave.