Tradesize = 1% of accountbalance

Questions about MultiCharts and user contributed studies.
User avatar
t-rader
Posts: 139
Joined: 02 Feb 2011
Location: Australia
Has thanked: 11 times
Been thanked: 27 times

Tradesize = 1% of accountbalance

Postby t-rader » 01 Apr 2011

Hi,

I'm trading forex in Multicharts and want to be able to place trade sizes as a proportion of my total account size dynamically.
So as my account increases, so does my trade size. Alternatively, if I start to have a bad run of losing trades, my trades sizes will get smaller.

I've tried looking through all the documentation but I couldn't find anything?
Is this something I can code or is there an option in multicharts for this?

eg. tradesize = 1% of accountbalance

Regards
T

User avatar
siscop
Posts: 197
Joined: 09 Jan 2011
Has thanked: 34 times
Been thanked: 29 times

Re: Tradesize = 1% of accountbalance

Postby siscop » 01 Apr 2011


User avatar
t-rader
Posts: 139
Joined: 02 Feb 2011
Location: Australia
Has thanked: 11 times
Been thanked: 27 times

Re: Tradesize = 1% of accountbalance

Postby t-rader » 01 Apr 2011

Does anyone know of a broker that can provide this kind of information to multicharts?
I am with mbtrading.

Regards
T

User avatar
siscop
Posts: 197
Joined: 09 Jan 2011
Has thanked: 34 times
Been thanked: 29 times

Re: Tradesize = 1% of accountbalance

Postby siscop » 03 Apr 2011

Ich fange mal an mit der Balanceabfrage des Accounts (Danke an den MC-Support):

Code: Select all

initialcapital
Und hier die Equity:

Code: Select all

var: _equity(0);
_equity = initialcapital + openpositionprofit + netprofit;
if (_equity < 100000) then buy next bar market;
edit (14.05.2010 von mir):
Wollte gerade mit dem Code spielen und habe dabei festgestellt, das mit diesen Codewörtern NICHT die echte Balance auf dem Account gemeint ist, sondern die Balance die man in den Eigenschaften zur Strategie einstellen kann.
Der Abruf der echten Balance ist noch nicht möglich, erst in MC 7, laut TS-Team.
Quote from Henrik at tom-next.de

In english
You are looking for the codeword "initialcapital". Only works with MC7.

User avatar
siscop
Posts: 197
Joined: 09 Jan 2011
Has thanked: 34 times
Been thanked: 29 times

Re: Tradesize = 1% of accountbalance

Postby siscop » 04 Apr 2011

I just tested it and it doesn't work with MC7 pre alpha. Initialcapital still shows the capital entered on the property page and not that given from the broker.

User avatar
t-rader
Posts: 139
Joined: 02 Feb 2011
Location: Australia
Has thanked: 11 times
Been thanked: 27 times

Re: Tradesize = 1% of accountbalance

Postby t-rader » 04 Apr 2011

Moderators (Dave, TJ),

Can you shed any light on this? i.e. will the release version of MC 7 include this functionality?
Any alternative ideas?

Thanks
T

User avatar
Stan Bokov
Posts: 963
Joined: 18 Dec 2009
Has thanked: 367 times
Been thanked: 302 times

Re: Tradesize = 1% of accountbalance

Postby Stan Bokov » 08 Apr 2011

You can try keywords i_OpenEquity and i_ClosedEquity to dynamically calculate contract amounts. For instance, something like:

value1 = ( InitialCapital + i_OpenEquity + ( i_ClosedEquity - InitialCapital ) ) / ( close * pointvalue );

buy value1 contracts next bar market;

User avatar
t-rader
Posts: 139
Joined: 02 Feb 2011
Location: Australia
Has thanked: 11 times
Been thanked: 27 times

Re: Tradesize = 1% of accountbalance

Postby t-rader » 09 Apr 2011

Thanks Stan, I'll give that a try


Return to “MultiCharts”