I was wondering if it is possible to have more that one outputs in the pinescript library? For example is the following code valid?
export sorting_float(float[] Value, int[] BarIndex) => //{
var NewBarInd = array.new_int()
ValueSorted = array.copy(Value)
sortedLowsIndices = array.sort_indices(Value)
array.sort(ValueSorted, order.ascending)
Size = array.size(BarIndex)
if Size>0
for i = 0 to Size-1
array.push(NewBarInd,array.get(BarIndex,array.get(sortedLowsIndices,i)))
ValueSorted, NewBarInd
where ValueSorted, NewBarInd
are supposed to be outputs...
Also if the above situation is resolved, how should I get the outputs in the main code? I see that the following code gives me error:
float[] output_1, int[] ouput_2 = mylib.sorting_float(Input_1, Input_2)