|
发表于 2009-11-23 13:09:36
|
显示全部楼层
先要利用的 買入的條件, 而因為模擬買賣多以訊號後一天的 開市價做買入位,
所以只要找出昨天是訊號日, 那今天開市位便是你要的買入價 !
例如: 買入條件 C> ref(H,-1)
那找出買入價方法可以: ValueWhen(1, ref( C>ref(H,-1) , -1) , O)
Function: Value When [valuewhen()]
SYNTAX valuewhen ( Nth, EXPRESSION, DATA ARRAY )
FUNCTION Returns the value of the DATA ARRAY when the EXPRESSION was true on the Nth most recent occurrence. This includes all data loaded in the chart.
EXAMPLE The formula "valuewhen( 2, cross(c,mov(c,10,s), rsi(20) )" returns the value of the RSI on the 2nd most recent occurrence of the closing price crossing above its 10-day moving average. |
|