2026-01-28 XQ部落格 P&L Chart 指標的藍色"臨界值直線"是如何畫出?試著寫成選股腳本,請問有無錯誤或改善之處?

  •   15 
  • 最後發表   塞繆爾  2 天前
塞繆爾 發文於   2026/02/28

var: Flag_PLChart1(false);   // 股價長期低於P&L Chart,近日站上

Flag_PLChart1 = (countIf(C[10]<=LastPoint[10],40)>=32 and countIf(C>=LastPoint,10)>=8 and C>=LastPoint) or 

                (countIf(C[10]<=LastPoint[10],80)>=64 and countIf(C>=LastPoint,10)>=8 and C>=LastPoint) or

                (countIf(C[10]<=LastPoint[10],120)>=96 and countIf(C>=LastPoint,10)>=8 and C>=LastPoint) or

                (countIf(C[15]<=LastPoint[15],40)>=32 and countIf(C>=LastPoint,15)>=12 and C>=LastPoint) or 

                (countIf(C[15]<=LastPoint[15],80)>=64 and countIf(C>=LastPoint,15)>=12 and C>=LastPoint) or

                (countIf(C[15]<=LastPoint[15],120)>=96 and countIf(C>=LastPoint,15)>=12 and C>=LastPoint) or 

                (countIf(C[20]<=LastPoint[20],40)>=32 and countIf(C>=LastPoint,20)>=16 and C>=LastPoint) or 

                (countIf(C[20]<=LastPoint[20],80)>=64 and countIf(C>=LastPoint,20)>=16 and C>=LastPoint) or

                (countIf(C[20]<=LastPoint[20],120)>=96 and countIf(C>=LastPoint,20)>=16 and C>=LastPoint);

 

if Flag_PLChart1 or 

   Flag_PLChart1[1]

then counts=counts+1;

XS小編 發文於   2026/03/02

Hello 塞繆爾,

 

小編會詢問相關人員該條水平線是如何畫出。

待有進一步消息時會再告知。

發表回覆
Close