怎樣獲得第一個符合條件的Barindex()呢?
我用explorer,篩選一年的data,它顯示五到六個的結果我想問我怎樣獲得第一個符合條件的Barindex()呢?
{:4_81:}想了很久都找不到答案
fastMa = MA(Close,30);
slowMA = MA(Close,50);
longMA = MA(Close,100);
buy=Cross(fastMa,LongMA) ;
Sell =Cross(slowMA,fastMA) ;
addcolumn(buy,"buy");
buybar=barcount-1-barssince(buy);
or
buybar=barcount-1-valuewhen(buy,barindex(),1);
頁:
[1]