- 精华
- 0
- 在线时间
- 19 小时
- UID
- 5394
- 积分
- 101
- 帖子
- 32
- 阅读权限
- 30
- 注册时间
- 2009-9-7
- 最后登录
- 2010-9-5
- 精华
- 0
- UID
- 5394
- 积分
- 101
- 帖子
- 32
- 主题
- 8
- 阅读权限
- 30
- 注册时间
- 2009-9-7
- 最后登录
- 2010-9-5
|
*/
parameters:
Length1(13),Offset1(8),Length2(8),Offset2(5),Length3(5),Offset3(3)
parameters: exitls(0)
Value1 = SMA( (H+L)/2, Length1)
Value2 = SMA( (H+L)/2, Length2)
Value3 = SMA( (H+L)/2, Length3)
Value4 = Value1[Offset1-1]
Value5 = Value2[Offset2-1]
Value6 = Value3[Offset3-1]
Value7 = MaxList( Value4, Value5, Value6 )
Value8 = MinList( Value4, Value5, Value6 )
Value9= Value4+Value5+Value6-Value7-Value8
if exitls = 1 then
If MarketPosition = -1 Then
Exitshort Value8 Stop
End If
If MarketPosition = 1 Then
Exitlong Value7 Stop
End If
end if
if exitls = 2 then
If MarketPosition = -1 Then
Exitshort Value9 Stop
End If
If MarketPosition = 1 Then
Exitlong Value9 Stop
End If
end if
If MarketPosition = -1 Then
Exitshort Value8 Stop
Buy ("多") Value7 Stop
End If
If MarketPosition = 1 Then
Exitlong Value7 Stop
Sell ("空") Value8 Stop
End If
If MarketPosition = 0 Then
Buy Value7 Stop
Sell Value8 Stop
End If 这个原理 我也不清楚..只知道这个是HTS 语言,程序是基于 鳄鱼线 的理论 写的
[ 本帖最后由 趋势7778888 于 2010-2-20 11:44 编辑 ] |
|