Stored value default value?

Advanced automation available in Guardian - Chat with others and share files here.
Post Reply
User avatar
RedBrain
Posts: 37
Joined: Tue Apr 17, 2018 8:20 pm

Hi everybody.
Want to find out what is the default value for new stored values? Is it 0?
I need to check if SV already have a value to "init" it, but <1 condition doesn't work.
sv1.PNG
Thanks.
You do not have the required permissions to view the files attached to this post.
User avatar
ShaunWhite
Posts: 9731
Joined: Sat Sep 03, 2016 3:42 am

I'm not 100% sure but I Init everything, SVs and Signals. I place them at the top of my rules def with a wide active time span, and allow them to trigger 1 time. It might not be very efficient but it always seems to work.
User avatar
RedBrain
Posts: 37
Joined: Tue Apr 17, 2018 8:20 pm

ShaunWhite wrote:
Sat Jun 02, 2018 4:40 am
I'm not 100% sure but I Init everything, SVs and Signals. I place them at the top of my rules def with a wide active time span, and allow them to trigger 1 time. It might not be very efficient but it always seems to work.
I do the same thing. But I need to put a condition to check if SV already has something. Looks like default value for new SV's is "none" so it can be compared in way "some value" is more than "none", but "some value" can not be less than "none".
User avatar
Dallas
Posts: 22674
Joined: Sun Aug 09, 2015 10:57 pm
Location: Working From Home

When a stored value is used as a condition, for the condition to be true then the stored value must have been assigned a value.

e.g. If you have a condition that tests 'Current Back Price is greater than stored value BACK_SNAPSHOT', then that'll only be true if BACK_SNAPSHOT has been given a value and also that the current back price is greater than it.
User avatar
RedBrain
Posts: 37
Joined: Tue Apr 17, 2018 8:20 pm

Dallas wrote:
Sat Jun 02, 2018 11:21 am
When a stored value is used as a condition, for the condition to be true then the stored value must have been assigned a value.

e.g. If you have a condition that tests 'Current Back Price is greater than stored value BACK_SNAPSHOT', then that'll only be true if BACK_SNAPSHOT has been given a value and also that the current back price is greater than it.
Yes, I understand and it's a small problem :) Problem is when I modify rules file - it resets all history, restart on the market and erase all stored values which I have collected previously. So I was trying to perform a check - if a SV has a value from previous run - do not modify it, otherwise reset. But it will not work as I see.
Post Reply

Return to “Bet Angel - Automation”