I’m having trouble with the ‘ONCE’ command. It seems to be assigning incorrect values to variables. A simple example of the code is as below:
Once a=0
If a=1 then
Buy 1 contracts at market
Endif
For some reason this code executes successfully, but if I use a=0 in the ‘if’ command, the code does not execute. Alternatively, the ‘if’ command executes successfully if I eliminate the ‘ONCE’ command.
I have a few other similar examples using various variables, where the ‘ONCE’ command seems to be assigning a different value than requested.
Has anyone come across this issue before and am I doing anything wrong?