函数返回数据位置状态。
1表示第1根K线,2表示最后1根K线,0表示中间的K线。
用法:
BARSTATUS
所属函数组:时间函数
不行吧
不考虑节假日的话,就不发帖了,
runmode:0;
beginweek:0;
endweek:0;
if barpos < 2 then
exit;
thisweek:=weekday();
if thisweek <dayofweek(date[barpos-1]) then
//本周第一个数据
beginweek := 1;
if barpos < datacount then
begin
if thisweek > dayofweek(date[barpos+1]) then
//本周最后一笔数据
endweek := 1;
end
请等待下个版本的新函数