如何求日內(nèi)第一次滿足條件A到當(dāng)前的周期數(shù)
作者:金字塔 來源:cxh99.com 發(fā)布時(shí)間:2015年03月04日
- 咨詢內(nèi)容:
日內(nèi)交易 如何計(jì)算日內(nèi)第一次滿足條件A到日內(nèi)當(dāng)前的周期數(shù)?
- 金字塔客服:
VARIABLE:n=0;
if date<>ref(date,1) then n:=0;
if 條件A then n:=1;
ss:barslast(n=1 and ref(n,1)=0);
ss就是當(dāng)天條件a成立到當(dāng)前的周期數(shù)