Could it be that this happens because the GetAccountValue(AccountItem.CashValue) function only returns a value after the first bar close in the COBC = true environment?
if this is the case, do you have any idea on how I can avoid this issue from happening?
Thanks for your help!

Comment