refHighestAfterEntry:=REF(HighestAfterEntry,1);
refLowestAfterEntry:= REF(LowestAfterEntry,1);
If HOLDING >=1 and ENTERBARS = 0 Then BEGIN
HighestAfterEntry:=Max(MyPriceKD, high);
LowestAfterEntry:=refLowestAfterEntry;
end
if HOLDING <=-1 and ENTERBARS = 0 Then BEGIN
LowestAfterEntry:= Min(MyPriceKK, low);
HighestAfterEntry:=refHighestAfterEntry;
end
if HOLDING <> 0 and ENTERBARS >= 1 Then BEGIN
HighestAfterEntry:= Max(refHighestAfterEntry,refhigh);
LowestAfterEntry:= Min(refLowestAfterEntry, reflow);
End
variable:h1:=0,l1:=-1000000;
if holding >=1 and enterbars = 0 then
begin
h1:=h;
//开多不更新最低价,l1会自动维持上次的值
end
if holding <=-1 and enterbars = 0 then
begin
l1:=l;
end
if holding <> 0 and enterbars >= 1 then
begin
if h>h1 then h1:=h;
if l<l1 then l1:=l;
end