Code question: Account Balance

Questions about MultiCharts and user contributed studies.
User avatar
Henrik
Posts: 140
Joined: 13 Apr 2010
Has thanked: 25 times
Been thanked: 11 times

Code question: Account Balance

Postby Henrik » 07 May 2010

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!

User avatar
Anastassia
Posts: 179
Joined: 18 Jan 2010
Been thanked: 4 times

Postby Anastassia » 07 May 2010

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

User avatar
Henrik
Posts: 140
Joined: 13 Apr 2010
Has thanked: 25 times
Been thanked: 11 times

Postby Henrik » 07 May 2010

Ah, thank you very much, Anastassia!

User avatar
Anastassia
Posts: 179
Joined: 18 Jan 2010
Been thanked: 4 times

Postby Anastassia » 07 May 2010

You are welcome Henrik
Have a nice weekend!

NiC72
Posts: 92
Joined: 02 Nov 2009
Location: Sweden
Has thanked: 34 times
Been thanked: 12 times

account balance??

Postby NiC72 » 10 May 2010

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?

janus
Posts: 747
Joined: 25 May 2009
Has thanked: 41 times
Been thanked: 83 times

Postby janus » 11 May 2010

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?

User avatar
Anastassia
Posts: 179
Joined: 18 Jan 2010
Been thanked: 4 times

Postby Anastassia » 13 May 2010

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

Adam333
Posts: 20
Joined: 05 Oct 2010

Re: Code question: Account Balance

Postby Adam333 » 05 Oct 2010

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

User avatar
Dave Masalov
Posts: 1712
Joined: 16 Apr 2010
Has thanked: 51 times
Been thanked: 485 times

Re: Code question: Account Balance

Postby Dave Masalov » 06 Oct 2010

Dear Adam333,

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

Adam333
Posts: 20
Joined: 05 Oct 2010

Re: Code question: Account Balance

Postby Adam333 » 06 Oct 2010

Great. Thanks Dave.


Return to “MultiCharts”