SI
SI
discoversearch

We've detected that you're using an ad content blocking browser plug-in or feature. Ads provide a critical source of revenue to the continued operation of Silicon Investor.  We ask that you disable ad blocking while on Silicon Investor in the best interests of our community.  If you are not using an ad blocker but are still receiving this message, make sure your browser's tracking protection is set to the 'standard' level.
Strategies & Market Trends : Predictions + Projections

 Public ReplyPrvt ReplyMark as Last ReadFilePrevious 10Next 10PreviousNext  
To: MechanicalMethod who started this subject1/22/2002 12:36:16 AM
From: MechanicalMethod   of 26
 
If anyone comes across an "exchange" sort I believe it's
faster than a bubble sort. Here's what I have and it's
working ok for this stage of the project. Actually I have
more but it's proprietary so I cut it. If this gets anyones
attention PM me.

{114 predict ****** v0.01}
{right click chart, format window, properties, bars to right=2}

var: ui(0), di(0), k(0), j(0);
array: uRoc[9999,0](0), dRoc[9999,0](0), uSort[3](0), dSort[3](0);

if ui>=3 and di>=3 then begin
uSort[0]=uRoc[ui,0]; {populate uSort}
uSort[1]=uRoc[ui-1,0];
uSort[2]=uRoc[ui-2,0];
uSort[3]=uRoc[ui-3,0];
dSort[0]=dRoc[di,0]; {populate dSort}
dSort[1]=dRoc[di-1,0];
dSort[2]=dRoc[di-2,0];
dSort[3]=dRoc[di-3,0];
end;

for K = 0 to 3 begin {sort uSort}
for J = K + 1 to 3 begin
if uSort[J] < uSort[K] then begin
Value1 = uSort[K];
uSort[K] = uSort[J];
uSort[J] = Value1;
end;
end;
end;
for K = 0 to 3 begin {sort dSort}
for J = K + 1 to 3 begin
if dSort[J] < dSort[K] then begin
Value1 = dSort[K];
dSort[K] = dSort[J];
dSort[J] = Value1;
end;
end;
end;
Report TOU ViolationShare This Post
 Public ReplyPrvt ReplyMark as Last ReadFilePrevious 10Next 10PreviousNext