Is there a sample code of NT 8 to update the account value after every trade?
I am trying to do the position sizing with my strategy on Forex, and there are several confusions I do not fully understand.
1) So the PointValue is 1, and TickSize is 1E-05, (I confirmed this in the output window) then, this means by default that the smallest pip is 1E-05, and the PointValue does not means the value of a standard lot-100,000 contracts, but one single contract?
2) The buying power of the back test account(displayed as "Backtest" in the performance statistics) seems to have no limit? I used these code to use the "SIM101" ($100,000) account value to do the position sizing:
lock(Account.All) // C# statement to secure a object from changing in a multi-thread processing. account=Account.All.FirstOrDefault(a => a.Name == "Sim101"); // assign "Sim101" to "account". xAccountSize=Account.Get(AccountItem.CashValue, Currency.UsDollar); // get account value.
@ 2017-05-18 11:40:00 Bactest Account size is 100000;PointValue is 1;TickSize is 1E-05;Pips to risk is 99; Contracts to risk is 2020202
Thanks.
Comment