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


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件公式模型编写问题提交 → ifflogic 和 lastbaronChart怎么实现

   

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


  共有2666人关注过本帖树形打印复制链接

主题:ifflogic 和 lastbaronChart怎么实现

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


加好友 发短信
等级:新手上路 帖子:19 积分:0 威望:0 精华:0 注册:2014/9/10 13:03:41
ifflogic 和 lastbaronChart怎么实现  发帖心情 Post By:2014/9/10 14:23:27    Post IP:218.80.192.232[只看该作者]

请问 金字塔里怎么实现和 easylanguage里相似功能:

1. ifflogic函数(以下是easylanguage的解释):

The IFFLogic function is used to conditionally return one of two specified true/false expressions.

Syntax

IFFLogic(Test, TrueVal, FalseVal)

Returns (Boolean)

The true/false value of TrueVal if Test is true; the true/false value of FalseVal if Test is false.

Parameters

Name

Type

Expression

Test

TrueFalse

Specifies the conditional expression to check (such as CloseOpen).

TrueVal

TrueFalse

Sets the True/False expression to evaluate if Test condition is true.

FalseVal

TrueFalse

Sets the True/False expression to evaluate if Test condition is false.

Remarks

The IFFLogic function enables you use a Test condition to determine whether to evaluate either a 'True' expression or 'False' expression.

This function is similar to the IFF function, however the second and third inputs are true/false expressions, not numeric values.

Example

Assigns to Value1 the true/false value of the expression Close>Close[1] if Close>Open is true or the true/false value of the expression Open<Open[1] if Close>Open is false.

Value1 = IFFLogic(Close>OpenClose>Close[1], Open<Open[1]);

Reference

The IFFLogic function was developed by TradeStation Technologies, Inc.



2. LastBarOnChart(以下是easylanguage的解释):

The LastBarOnChart function is used to determine if the current bar being evaluated is the last bar on the chart.

Syntax

LastBarOnChart

Returns (Boolean)

True if LastBarOnChart is the last charted bar. False if not.

Parameters

None

Example

In order to play a wave (sound) file only in the last bar of the chart you can write:

If LastBarOnChart Then
 Condition1 = PlaySound("C:\window\ding.wav");

note_icon.png   This function will return True for all bars on a chart with tick-based interval, which have the same date and time as the last bar of the chart.





 回到顶部
帅哥哟,离线,有人找我吗?
jinzhe
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:罗宾汉 帖子:46311 积分:50819 威望:0 精华:2 注册:2011/3/23 8:50:25
  发帖心情 Post By:2014/9/10 14:41:11    Post IP:58.246.57.26[只看该作者]

讲中文


金字塔—专业程序化交易量化投资平台

客户服务部

----------------------------------------------------------- 欢迎您参加我公司的技术培训,具体培训需求请发邮件到service@weistock.com

您的宝贵建议或者投诉,请发往邮箱:weiwei@weistock.com

 回到顶部
帅哥哟,离线,有人找我吗?
optimus
  3楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:新手上路 帖子:19 积分:0 威望:0 精华:0 注册:2014/9/10 13:03:41
回复:(jinzhe)讲中文  发帖心情 Post By:2014/9/10 14:48:08    Post IP:218.80.192.232[只看该作者]

好吧,意思是这个样子的:

1. ifflogic(easylanguage里):

这个函数用法是:变量A=ifflogic(判断条件,逻辑表达式1,逻辑表达式2)

当判断条件为真时,执行逻辑表达式1,该表达式的值可能为true或false,把这个结果赋给变量A,

当判断条件为假时,执行逻辑表达式2,该表达式的值可能为true或false,把这个结果赋给变量A

我想问在金字塔里该怎么实现这个函数的功能?

2. LastBarOnChart:

这个是easylanguage里内建的一个变量。

如果当前读到的Bar是图形上的最后一个Bar,LastBarOnChart的值就是true

如果当前读到的Bar不是图形上的最后一个Bar,LastBarOnChart的值就是false

我想问这个变量在金字塔里可有对应的功能来实现?

 回到顶部
帅哥哟,离线,有人找我吗?
jinzhe
  4楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:罗宾汉 帖子:46311 积分:50819 威望:0 精华:2 注册:2011/3/23 8:50:25
  发帖心情 Post By:2014/9/10 14:49:31    Post IP:58.246.57.26[只看该作者]

1.if

2.islastbar



金字塔—专业程序化交易量化投资平台

客户服务部

----------------------------------------------------------- 欢迎您参加我公司的技术培训,具体培训需求请发邮件到service@weistock.com

您的宝贵建议或者投诉,请发往邮箱:weiwei@weistock.com

 回到顶部
帅哥哟,离线,有人找我吗?
optimus
  5楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:新手上路 帖子:19 积分:0 威望:0 精华:0 注册:2014/9/10 13:03:41
回复:(jinzhe)1.if2.islastbar  发帖心情 Post By:2014/9/10 14:58:34    Post IP:218.80.192.232[只看该作者]

好的,谢谢。

 回到顶部