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

  •   48 
  • 最後發表   塞繆爾  2026 三月 06
塞繆爾 發文於   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 塞繆爾,

 

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

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

XS小編 發文於   2026/03/06

Hello 塞繆爾,

 

小編補充,該線應該是使用技術線圖中的繪製水平線功能 (參考附圖)。

並非由XS語法計算。

附加文件

發表回覆
Close