PureBytes Links
Trading Reference Links
|
Have written two different functions at different times which accept
input/output variables of the type numericref, and where the behaviour have
been both unexpected and unwanted. Both occasions have included testing of
the variables, with tests like "crosses below" or so.
The structure is a function of type indicator, that sends some (three)
variables to an underlying function. The underlying function has defined
these variables as numericref, and does some tests using simple tests like
"crosses below".
What seems to be happening is that if one of the variables is set, and the
other makes some part of the test, then the second and third variable does
not behave as it should. Sort of looks like the test function affects the
variable to return a value from one or two bars before or something similar.
Have verified this by splitting the below function into different separated
functions without numericref variables, and then they behave as expected.
Have also tested by passing other variables into the function, first
initialising these variables to get the value of my "original" variables,
then calling the function, and if something was changed copying the value
back to the original variables. Doing this, it also works as expected.
Anyone knows anything of this problem? Am I doing something wrong, or is
there a bug in TS when handling numericref variables?
--- Mats ---
Cap Gemini AB
European company of the year 1999
|