 |
mori868
資深會員
註冊日期: Jan 2004
來 自:
文章數量: 1036 |
如何求得
AQ1:=ref(LLV(L,N),2)>ref(L,1) and ref(L,1)<L;
BQ1:=ref(HHV(H,N),2)<ref(H,1) and ref(H,1)>H;
CK:=BQ1-AQ1;
BLK:=ref(CK,barslast(CK<>0));
BlkSW:=BLK<>ref(BLK,1) or barpos=0;
HH:=H; LL:=L;
MaxHP:=0; MinLP:=0; MM:=C*0;
for i=lbound(BLK) to datacount do begin
if BlkSW[i] or i=datacount then begin
if MaxHP>0 then MM[MaxHP]:=1;
if MinLP>0 then MM[MinLP]:=-1;
MaxHP:=0; MinLP:=0;
end;
if BLK[i]=1 and CK[i]=1 then begin
if MaxHP=0 then MaxHP:=i;
if HH[i]>HH[MaxHP] then MaxHP:=i;
end else if BLK[i]=-1 and CK[i]=-1 then begin
if MinLP=0 then MinLP:=i;
if LL[i]<LL[MinLP] then MinLP:=i;
end;
end;
AQ:=MM=-1;
BQ:=MM=1;
//
CK:=AQ-BQ;
CK:=ref(CK,BARSLAST(CK<>0));
ZA:=IF(CK=1, BARSLAST(AQ)+1,0);
ZB:=IF(CK=-1,BARSLAST(BQ)+1,0);
T_in:=TIME>=084801 and TIME<=131501;
T_out:=TIME<=132901;
利損:= 20 ;
口數:= 1 ;
BB:=AQ and T_in;
SS:=BQ and T_in;
買價:=If(ZA>0,支撐,0);
賣價:=If(ZB>0,壓力,0);
損價a:=If(ZA>0,買價-利損,0);
損價b:=If(ZB>0,賣價+利損,0);
損a:=If(BARSLAST(L<損價a),0,1);
損b:=If(BARSLAST(H>損價b),0,1);
希望1:買進(1)賣出(-1)如此相對做
2:若(損a or 損b )成立時就停損
3:請教如何求得買賣信號PP
|
最後由 mori868 在 2021-11-26 10:03 編輯 |
向版主報告此篇 |  |
|
2021-11-26 09:57 |
|
|
|  |
 |
cgjj
總版主

註冊日期: Oct 2003
來 自:
文章數量: 18091 |
回覆: 如何求得
引用: 最初由 mori868 發表
AQ1:=ref(LLV(L,N),2)>ref(L,1) and ref(L,1)<L;
BQ1:=ref(HHV(H,N),2)<ref(H,1) and ref(H,1)>H;
CK:=BQ1-AQ1;
BLK:=ref(CK,barslast(CK<>0));
BlkSW:=BLK<>ref(BLK,1) or barpos=0;
HH:=H; LL:=L;
MaxHP:=0; MinLP:=0; MM:=C*0;
for i=lbound(BLK) to datacount do begin
if BlkSW[i] or i=datacount then begin
if MaxHP>0 then MM[MaxHP]:=1;
if MinLP>0 then MM[MinLP]:=-1;
MaxHP:=0; MinLP:=0;
end;
if BLK[i]=1 and CK[i]=1 then begin
if MaxHP=0 then MaxHP:=i;
if HH[i]>HH[MaxHP] then MaxHP:=i;
end else if BLK[i]=-1 and CK[i]=-1 then begin
if MinLP=0 then MinLP:=i;
if LL[i]<LL[MinLP] then MinLP:=i;
end;
end;
AQ:=MM=-1;
BQ:=MM=1;
//
CK:=AQ-BQ;
CK:=ref(CK,BARSLAST(CK<>0));
ZA:=IF(CK=1, BARSLAST(AQ)+1,0);
ZB:=IF(CK=-1,BARSLAST(BQ)+1,0);
T_in:=TIME>=084801 and TIME<=131501;
T_out:=TIME<=132901;
利損:= 20 ;
口數:= 1 ;
BB:=AQ and T_in;
SS:=BQ and T_in;
買價:=If(ZA>0,支撐,0);
賣價:=If(ZB>0,壓力,0);
損價a:=If(ZA>0,買價-利損,0);
損價b:=If(ZB>0,賣價+利損,0);
損a:=If(BARSLAST(L<損價a),0,1);
損b:=If(BARSLAST(H>損價b),0,1);
希望1:買進(1)賣出(-1)如此相對做
2:若(損a or 損b )成立時就停損
3:請教如何求得買賣信號PP
"希望" 是沒有用的,規則決定了一切!
您提供的資訊並不完整,定義也不明確 ~~
故恕難協助,這問題請您自行解決
|
|
向版主報告此篇 |  |
|
2021-11-26 10:15 |
|
|
|  |
 |
wangs855955
中級會員

註冊日期: Aug 2005
來 自: 彰化鹿港
文章數量: 43 |
.....
__________________
wang 88
|
最後由 wangs855955 在 2021-12-18 12:02 編輯 |
向版主報告此篇 |  |
|
2021-12-18 11:55 |
|
|
|  |
本站所有內容未經作者授權禁止轉貼節錄, 發表言論僅供參考勿作為投資決策依據。瀏覽本站請使用 IE 5.5 以上版本, 最佳瀏覽解析度 1024 x 768 全彩。
|
Powered by: vBulletin Version 2.3.0 - Copyright©2000-, Jelsoft Enterprises Limited.
簡愛洋行 製作 Copyright 2003-. All Rights Reserved. 聯絡我們
|