First question:
After I debug, I found that GetAccountValue(AccountItem.CashValue) returns 0 for me. I used AMP's demo account to log into CQG. After I launch NT7, I click Accounts, I see that I have two accounts there. (Not sure why). First one is Sim101, which shows cash value of 100000, and second starts with DEMOAMP1220! something, and account value is 0.
In backtesting, I have a function that tries to determine how many contracts to trade based on account cash value, and since GetAccountValue(AccountItem.CashValue) returns 0, my function returns 0 as the number of contracts, so my strategy is unable to run. This is quite weird. Can anyone please help me?
The second question:
When I try to backtest, I use the 3 minute chart, and I can set test from 1/1/2012 to 3/5/2012. However, I am not sure if CQG really has that much date for the 3 minute chart. How would NT7 handle this case?
The third question:
When I start live trading, I would want to apply my strategy to multiple charts. But if at the same time all of them try to entry a trade, I want to restrict the total number. Let's say, I have 100 instruments applied, and if at the same time all of them find an entry, I only want the first five. How do I do that? I am not sure if the following code is applied to only that specific instrument, or it is a glabal variable in NT7 that all strategys respect?
EntriesPerDirection = 5;
EntryHandling = EntryHandling.AllEntries;
Comment