欢迎使用金字塔普通技术服务论坛,您可以在相关区域发表技术支持贴。
我司技术服务人员将优先处理 VIP客服论坛 服务贴,普通区问题处理速度慢,请耐心等待。谢谢您对我们的支持与理解。


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件公式模型编写问题提交 → 几个止盈的源代码

   

欢迎使用金字塔普通技术服务论坛,您可以在相关区域发表技术支持贴。
我司技术服务人员将优先处理 VIP客服论坛 服务贴,普通区问题处理速度慢,请耐心等待。谢谢您对我们的支持与理解。    


  共有8406人关注过本帖平板打印复制链接

主题:几个止盈的源代码

帅哥哟,离线,有人找我吗?
KKSH
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:新手上路 帖子:24 积分:112 威望:0 精华:0 注册:2011/2/15 21:08:00
  发帖心情 Post By:2011/3/7 16:50:41    Post IP:112.65.22.175[只看该作者]

Cumulate(累积)
SYNTAX        cum( DATA ARRAY )

FUNCTION        Calculates a cumulative sum of the DATA ARRAY from the first period in the chart.
EXAMPLE        The formula "cum( 1 )" calculates an indicator that rises one point for each day since the beginning of the chart; the formula "cum( C )" calculates the cumulative total of all closing prices from the beginning of the chart.

 

 


 

PREV
The PREV constant allows you to create self-referencing formulas.  A self referencing formula is one that is able to reference the "previous" period's value of itself.
For example, the following is an example of a self referencing formula:
((H+L+C)/3) + PREV
This simple formula divides the high, low, and closing prices by 3 and then adds this value to yesterday's value of the ((H+L+C)/3).
The calculation of the popular indicator On Balance Volume illustrates the use of the PREV function.

(if(c>ref(c,-1),1,-1)*volume)+PREV
Although On Balance Volume can be calculated without the use of the PREV function, an exponential moving average cannot (other than using the mov() function).  The following formula shows how a 18% exponential moving average (approximately 10-periods) is calculated using the PREV function.
(close*0.18)+(PREV*0.82)

[此贴子已经被作者于2011-3-7 16:50:54编辑过]

 回到顶部
总数 11 1 2 下一页