Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Nov 23, 2020 14:11:43 GMT
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.
|
|
|
Post by Ipposnif on Nov 24, 2020 21:57:51 GMT
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!
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Nov 25, 2020 11:36:01 GMT
No problem, thanks for the reply. The variables are working now. Thank you for the great software!
|
|