Hi I think I know the answer to this already but is it possible to associate a label with array entries so that they stay in the correct place after an arraysort? In the hypothetical example below, it works until I sort the array and then you would lose the label order obviously. defparam drawonlastbaronly = true ema5 = exponentialaverage[5](close) ema10 = exponentialaverage[10](close) ema21 = exponentialaverage[21](close) sma50 = average[50](close) sma100 = average[100](close) sma200 = average[200](close) // create ma array $ma[1] = ema5 $ma[2] = ema10 $ma[3] = ema21 $ma[4] = sma50 $ma[5] = sma100 $ma[6] = sma200 // output ma array for j = 1 to lastset($ma) mymas = $ma[j] drawtext("#mymas#",barindex+50,j*0.1) coloured("blue") next // create ma label array $malabel[1] = 5 $malabel[2] = 10 $malabel[3] = 21 $malabel[4] = 50 $malabel[5] = 100 $malabel[6] = 200 // output may label array for j = 1 to lastset($malabel) mymalabel = $malabel[j] drawtext("ma #mymalabel#",barindex,j*0.1) coloured("blue") next return Is there a way this could be achieved? Thanks Rob