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
Tradesize = 1% of accountbalance
Re: Tradesize = 1% of accountbalance
Quote from Henrik at tom-next.deIch fange mal an mit der Balanceabfrage des Accounts (Danke an den MC-Support):Und hier die Equity:Code: Select all
initialcapital
edit (14.05.2010 von mir):Code: Select all
var: _equity(0);
_equity = initialcapital + openpositionprofit + netprofit;
if (_equity < 100000) then buy next bar market;
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.
In english
You are looking for the codeword "initialcapital". Only works with MC7.
- Stan Bokov
- Posts: 963
- Joined: 18 Dec 2009
- Has thanked: 367 times
- Been thanked: 302 times
Re: Tradesize = 1% of accountbalance
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;
value1 = ( InitialCapital + i_OpenEquity + ( i_ClosedEquity - InitialCapital ) ) / ( close * pointvalue );
buy value1 contracts next bar market;