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

Re: Minlist, Maxlist (sorting an array)



PureBytes Links

Trading Reference Links

For this one, I used Excel to build a data file of something over 2000
random numbers (attached.) Then I plotted it and applied the following
indicator. Adjust maxbarsback in the indicator settings to determine how
many bars the thing runs on. You can either turn the indicator off/on or
change the commented code in power editor and verify. Then just time how
long it takes to plot the indicator. Crude but it did the job. :-)

Var: ii(0), jj(0);
Array: Arr[1000](0);

{If lastbaronchart then begin}
	for ii = 0 to 1000 begin
		arr[ii] = close[ii];
	end;
	jj = _heapsort_a(arr,1000);
	{jj = SortUp_a(arr,1000);}
	plot1(jj,"");
{end;}

-- 
  Dennis
Attachment:
random.zip

Attachment: Description: "Description: Zip compressed data"