以文本方式查看主题 - 金字塔客服中心 - 专业程序化交易软件提供商 (http://weistock.com/bbs/index.asp) -- 公式模型编写问题提交 (http://weistock.com/bbs/list.asp?boardid=4) ---- ifflogic 和 lastbaronChart怎么实现 (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=69796) |
||||||||||||
-- 作者:optimus -- 发布时间:2014/9/10 14:23:27 -- ifflogic 和 lastbaronChart怎么实现 请问 金字塔里怎么实现和 easylanguage里相似功能: 1. ifflogic函数(以下是easylanguage的解释): The IFFLogic function is used to conditionally return one of two specified true/false expressions. SyntaxIFFLogic(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
RemarksThe 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. ExampleAssigns 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>Open, Close>Close[1], Open<Open[1]); ReferenceThe 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. SyntaxLastBarOnChart Returns (Boolean)True if LastBarOnChart is the last charted bar. False if not. ParametersNone ExampleIn order to play a wave (sound) file only in the last bar of the chart you can write: If LastBarOnChart Then
|
||||||||||||
-- 作者:jinzhe -- 发布时间:2014/9/10 14:41:11 -- 讲中文 |
||||||||||||
-- 作者:optimus -- 发布时间:2014/9/10 14:48:08 -- 回复:(jinzhe)讲中文 好吧,意思是这个样子的: 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 -- 发布时间:2014/9/10 14:49:31 -- 1.if 2.islastbar |
||||||||||||
-- 作者:optimus -- 发布时间:2014/9/10 14:58:34 -- 回复:(jinzhe)1.if2.islastbar 好的,谢谢。 |