[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Data Array as Input



PureBytes Links

Trading Reference Links

Bill -

Thanks. It works "as advertised". The last C of value2 was throwing me. 
I used Excel to get all the )'s right, but  last else  being C was what 
I didn't get. Forgot about decimal values for dataarray.

Ron

billhebert wrote:

>Ron,
>
>You are on the right track,...
>
>Try this code:
>
>dataarray:=Input("Data array. Enter a number 1=O, 2=H, 3=L, 4=C, 5=V",
>1,5,4); {Close is default}
>value2:=If(dataarray=1,O,IF(dataarray=2,H,If(dataarray=3,L,If(dataarray=4,C,
>If(dataarray=5,V,C)))));
>
>Then use <value2> in you Indicator
>
>Bill
>