連續10天K棒的最高價都在均線之下的話請在第十天標記,有大老能分享怎麼畫嗎

  •   92 
  • 最後發表   .uu.  2022 二月 15
.uu. 發文於   2022/02/13

我寫出了這玩意

可以的話拜託只叫我一下

input: length(10,"天期");

variable: mid(0);

 

mid=average(close,length);

plot1(mid,"中線");

 

value1 = countIf(high< mid,length);

if value1 < mid then plot2(close,"input");

以下是我的寫法,不知道哪出錯了

 

 

XQ小幫手 發文於   2022/02/15

Hello .uu.,

 

您可以使用 trueall 函數即可,並不需要用countif

舉例來說:

input: length(10,"天期");

variable: mid(0);

 

mid=average(close,length);

plot1(mid,"中線");

 

if trueall(high < mid) then plot2(close,"input");

這樣就可以在10天最高價都低於平均線的Bar上作標記。

發表回覆
Close