[amibroker] Re: ValueWhen X Null values

 

array is initialized with null values except array[0] which receives 10
ret returns 10 even after many trues exp1.
My conclusion
When value of ARRAY is NULL, VALUEWHEN keeps looking for another true occurence with non null value
in other words, null is not a value

SetBarsRequired(sbrAll);
Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );

bi = BarIndex();

Plot(bi, "\nbi", colorRed, styleNoLine | styleOwnScale);

exp1 = (bi % 50)==0;

Plot(exp1, "exp1", colorGreen, styleHistogram | styleOwnScale);

ARRAY = Null;
ARRAY[0] = 10;

Plot(ARRAY, "\nARRAY", colorRed, styleDashed | styleOwnScale);

ret = ValueWhen( exp1, ARRAY);

Plot(ret, "\nret", colorRed, styleDashed | styleOwnScale);

__._,_.___

Posted by: andwilson3@gmail.com
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (2)

Check out the automatic photo album with 1 photo(s) from this topic.
valuewhen.jpg
**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/


.

__,_._,___

Related Posts


EmoticonEmoticon

:)
:(
=(
^_^
:D
=D
=)D
|o|
@@,
;)
:-bd
:-d
:p
:ng
:lv