鱷魚線數值

  •   399 
  • 最後發表   QQ1919  2017 十一月 10
QQ1919 發文於   2017/11/03

之前有人發問選股中心唇齒顎的數值與系統的數值不一樣,我參考了小幫手關於鱷魚線這篇的程式碼,編譯以後顯示「選股」腳本中無法使用"plot",我將以下拿掉以後可以編譯成功,可是執行出來的選股唇齒顎的數值與系統的數值不一樣..

plot1(Jaws);
plot2(Teeth); plot3(Lips);

排序方式: 標準 | 最新
XQ小幫手 發文於   2017/11/06

你好:

plot是用在指標上的喔,所以選股腳本不能使用。

選股腳本可以使用 OutputField - (內建函數),請參考說明網頁。

數值不同的問題需要你多做說明,以利小幫手提供協助,謝謝。

QQ1919 發文於   2017/11/07

我的程式碼如下↓

variable:Jaws_Initial(0), Lips_Initial(0), Teeth_Initial(0), Jaws(0), Lips(0), Teeth(0); 

 

 

value1 = (high + low)/2;    //  中值

 

 

//  初始值顎、齒、唇第一筆

if  currentbar = 1 then

begin

    Jaws_Initial = value1;

    Teeth_Initial= value1;

    Lips_Initial = value1;

end;

 

//  顎初始值 第2筆 至 第13筆 的計算

if  currentbar > 1 and currentbar <= 13 then

begin

    Jaws_Initial = Jaws_Initial[1] + (value1 - Jaws_Initial[1]) / 13;

end;

 

//  齒初始值 第2筆 至 第8筆 的計算

if  currentbar > 1 and currentbar <= 8 then

begin

    Teeth_Initial = Teeth_Initial[1] + (value1 - Teeth_Initial[1]) / 8;

end;

 

//  唇初始值 第2筆 至 第5筆 的計算

if  currentbar > 1 and currentbar <= 5 then

begin

    Lips_Initial = Lips_Initial[1] + (value1 - Lips_Initial[1]) / 5;

end;

 

 

 

//  顎第一筆 取8天前的EMPt值作為當天的顎線值

if  currentbar = 21 then Jaws = Jaws_Initial;

 

//  齒第一筆 取5天前的EMPt值作為當天的齒線值

if  currentbar = 13 then Teeth = Teeth_Initial;

 

//  唇第一筆 取3天前的EMPt值作為當天的齒線值

if  currentbar = 8 then Lips = Lips_Initial;

 

 

 

//  顎

if  currentbar > 21 then Jaws = Jaws[1] + (value1[8] - Jaws[1]) / 13;

 

//  齒

if  currentbar > 13 then Teeth = Teeth[1] + (value1[5] - Teeth[1]) / 8;

 

//  唇

if  currentbar > 8 then Lips = Lips[1] + (value1[3] - Lips[1]) / 5;

 

settotalbar(200);

 

condition1 = low > Lips and Lips > Teeth and Teeth > Jaws; //當日低點>唇>齒>顎

 

if condition1 then ret = 1;

 

outputfield(1, low, "當日低點");

outputfield(2, Lips, "唇");

outputfield(3, Teeth, "齒");

outputfield(4, Jaws, "顎");


 

選股結果如下,以1472為例,選股中心看到的唇齒顎分別為:32.03、26.04、21.36

而實際上圖的唇齒顎為39.11、39.28、38.23

 

選股

 

 

XQ小幫手 發文於   2017/11/10

你好:

  小幫手這邊看是對的喔,兩邊會不一致的原因,是你技術分析這邊是用"還原日"線,所以選股中心的頻率也需要改成"還原日"線才會一樣,以上說明。

發表回覆
Close