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 : TradeStation - Why No thread for this mega product

 Public ReplyPrvt ReplyMark as Last ReadFilePrevious 10Next 10PreviousNext  
To: Nick Morvay who wrote (124)11/7/2001 9:31:02 PM
From: MechanicalMethod   of 147
 
Thanks Nick, I tried a few mail lists that are off shoots
from the old omega list and it was my next choice but I
received several answers. If you come 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.

Best regards, MM

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