double myAccountSize = GetAccountValue(AccountItem.CashValue);
double sharesToBuy = myAccountSize / Close[0];
int quantityToBuy = (int)sharesToBuy;
My account is $1000, and I'm using the above code. Ninja Trader says I'm trying to make an order of $2000. Am I not seeing something? Is there some weird broker rule I'm not aware of? Thanks.
Comment