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.
Thanks.
Stored value default value?
- 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.
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".ShaunWhite wrote: ↑Sat Jun 02, 2018 4:40 amI'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.
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.
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.Dallas wrote: ↑Sat Jun 02, 2018 11:21 amWhen 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.