Hello. I am trying to set the bet size in a strategy using the variables @balance and @bfliability, as described on the Variables page in the help file. However, when I try to use these variables in a strategy, or in Expression Watcher, I receive a message saying "Must declare scalar variable @balance" or "Must declare scalar variable @bfliability". I am using the latest software, version 3.1.26.
Hi, you are right these two variables are missing, but you can add them with the following procedure:
open "Database Command" from menu Tools and copy/paste the following code
insert into tbl_sysvariables (name,declaration,funct) select 'balance', 'declare @balance numeric(18,2)', 'select @balance=valuenum from tbl_SysCfg where codice=''bf_balance_available'''; insert into tbl_sysvariables (name,declaration,funct) select 'bfliability', 'declare @bfliability numeric(18,2)', 'select @bfliability=valuenum from tbl_SysCfg where codice=''bf_liability''';
Then press the button "Execute". Now you can access them from the strategies.
I will add these variables for everyone in the next release. Thank you for pointing out this bug!