請求取得條件成立時當下的收盤價以及成交量

  •   310 
  • 最後發表   Tommy9205  2025 二月 27
Tommy9205 發文於   2025/02/26

condition1=((close-average(close,5))/average(close,5))>0.05;

condition2=((volume-average(volume,5))/average(volume,5))>1;

condition3=((close-average(close,5))/average(close,5))<0;

condition4=((volume-average(volume,5))/average(volume,5))<0;

 

 

if Condition1 and Condition2 then plot1(low,"強");

if Condition1 and Condition2 then plot3(close,"收盤價");

if Condition3 and Condition4 then plot2(low,"弱");

你好我想找設定一個

value1= Condition1 and Condition2 成立時當下的收盤價

value2= Condition1 and Condition2 成立時當下的成交量

 

附加文件

排序方式: 標準 | 最新
虎科大許教授 發文於   2025/02/26

if Condition1 and Condition2 then

    Begin

        plot1(low,"強");

        plot2(c,"收盤價");

        plot3(v,"成交量");

    End;

由於價量數據大小差異很大,繪製指標時要選擇不同的座標軸。

Tommy9205 發文於   2025/02/27

To虎大

我是想把條件取出來變成value 數值,再麻煩你一下。

value1=收盤價

value2= 成交量

 

 

虎科大許教授 發文於   2025/02/27

if Condition1 and Condition2 then

begin

    value1=c;

    value2=v;

end

else

begin

    value1=0;

    value2=0;

end;

發表回覆
Close