打印本文打印本文 关闭窗口关闭窗口

请教函数的二次递归公式

作者:金字塔 来源:cxh99.com 发布时间:2017年02月04日
  • 咨询内容: 各位高手,请教如果实现下面的公式:f(T)=A+B*f(T-1)+c*f(T-2).    (T>=2)f(T)=Close.    (T<2)谢谢各位指教。

     

  • 金字塔客服:

    variable:f=close;

    if barpos<=2 then f:=close;

    f1:=ref(f,1);

    f2:=ref(f,2);

    if barpos>=3 then f:=a+b*f1+c*f2

     

  • 用户回复: 非常感谢!
打印本文打印本文 关闭窗口关闭窗口