在1分k腳本,想要紀錄曾經發生過"1分鐘黑k2%",
然後之後的k棒符合條件進場條件,且發生過"1分鐘黑k2%"就進場
variable:touch(0);
if C/O-1 <=-0.02 then touch=1;
if touch=1 and 符合條件 then 進場
這個邏輯寫法好像不太對,不知要如何修正。
謝謝~
在1分k腳本,想要紀錄曾經發生過"1分鐘黑k2%",
然後之後的k棒符合條件進場條件,且發生過"1分鐘黑k2%"就進場
variable:touch(0);
if C/O-1 <=-0.02 then touch=1;
if touch=1 and 符合條件 then 進場
這個邏輯寫法好像不太對,不知要如何修正。
謝謝~
(1)你先要定義黑K 2%是什麼。
(2)必須先定義,黑K是今天盤中的K棒,還是過去歷史K棒。若是歷史K棒,還需要定義一個期間。
(3)若是指今天的黑K出現2%的情況,還需要留意跑歷史K棒可能也有出現相同的情況。
教授好,
黑k 2% 指當日盤中1分k 收盤價/開盤價-1小於-2%
也就是若盤中1分k曾出現過黑k 2% 就記錄。 若之後日內有出現1分k
紅k 3% 則進場。
If C/O-1<=-2% then touch=1;
if touch=1 and C/O-1>=3% then 進場。
謝謝🙏
var: intrabarpersist touch(0);
if date<>date[1] then touch=0;
If 100*(C/O-1)<=-2 then touch=1;
if touch=1 and 100*(C/O-1)>=3 then setposition(1);
原來是要宣告intrabarpersist 才行
感謝教授,我再試試
4 評論