

您好感恩,請幫我~~修改紅三兵為限用一分鐘使用,這樣可以嗎??
我需要的紅三兵只要每根收盤大於開盤紅k實體漲1%即可 有上下引線也沒關系(如圖一有上下引線)~~~~~也不限定OPEN一定要前根CLOSE比還要高(如圖二這樣也可以)。
if barfreq <> "Min" or Barinterval <>1 then RaiseRuntimeError("請設定頻率為1分鐘");
if close > close[1] * 1.01 then ret=1;
if close > open *1.01 and close[1] > open [1] *1.01 and close[2] > open [2] *1.01
then ret = 1 ;
~~~~~~~~~~~~~~~~~~~~~~~~~
以下是紅三兵找的範例參考~~紅三兵是實體漲*0.75%並 close要大於前bar close
紅三兵範例參考
[檔名:] 紅三兵 [資料夾:] 酒田戰法 [適用方向] 多
[說明:] 連續三根上漲實體K棒 [資料讀取] 10 [最大引用] 5
{判斷狀況}
condition1= ( close - open ) >(high -low) * 0.75 ;//狀況1: 實體上漲K棒
condition2= ( close[1] - open[1] ) >(high[1] -low[1]) * 0.75 ;//狀況2: 實體上漲K棒
condition3= ( close[2] - open[2] ) >(high[2] -low[2]) * 0.75 ;//狀況3: 實體上漲K棒
condition4= close > close[1] ;//狀況4: 上漲
condition5= close[1] > close[2] ;//狀況5: 上漲
{結果判斷}
IF condition1 and condition2 and condition3 and condition4 and condition5 THEN RET=1;
-----------------------------------------------------------------------------------------------------------------------------------------

25 評論