hts 停損停利的語法問題 - 財經
By Eartha
at 2009-03-31T11:29
at 2009-03-31T11:29
Table of Contents
※ [本文轉錄自 Option 看板]
作者: ywood (黃蜂) 看板: Option
標題: [問題] hts 停損停利的語法問題
時間: Tue Mar 31 11:21:31 2009
我的做法是停損採取絕對點數的停損
但是停利的部分是採用突破高低點的方式
//停損
If MarketPosition = 1 Then
OrderPrice =Entryprice(0)- value3
Exitlong ("XS") next Bar at OrderPrice Stop
End if
If MarketPosition = -1 Then
OrderPrice = EntryPrice(0) + value3
ExitShort ("XB") next Bar at OrderPrice Stop
End if
//停利
If MarketPosition = 1 and value5<=r1 Then
OrderPrice =highest(h,rday)
Exitlong ("XS1") next Bar at OrderPrice limit
End if
If MarketPosition = -1 and value5<=r1 Then
OrderPrice = lowest(l,rday)
ExitShort ("XB1") next Bar at OrderPrice limit
End if
但是不知道為什麼停利的部分好像都會有問題
有時候會停利但是有時候卻又沒有
不知道有沒有人可以幫忙確認一下
--
作者: ywood (黃蜂) 看板: Option
標題: [問題] hts 停損停利的語法問題
時間: Tue Mar 31 11:21:31 2009
我的做法是停損採取絕對點數的停損
但是停利的部分是採用突破高低點的方式
//停損
If MarketPosition = 1 Then
OrderPrice =Entryprice(0)- value3
Exitlong ("XS") next Bar at OrderPrice Stop
End if
If MarketPosition = -1 Then
OrderPrice = EntryPrice(0) + value3
ExitShort ("XB") next Bar at OrderPrice Stop
End if
//停利
If MarketPosition = 1 and value5<=r1 Then
OrderPrice =highest(h,rday)
Exitlong ("XS1") next Bar at OrderPrice limit
End if
If MarketPosition = -1 and value5<=r1 Then
OrderPrice = lowest(l,rday)
ExitShort ("XB1") next Bar at OrderPrice limit
End if
但是不知道為什麼停利的部分好像都會有問題
有時候會停利但是有時候卻又沒有
不知道有沒有人可以幫忙確認一下
--
Tags:
財經
All Comments
Related Posts
Trend Following / Currency Trading
By Joseph
at 2009-03-31T02:05
at 2009-03-31T02:05
抓取台指期tick data
By Jacky
at 2009-03-27T10:21
at 2009-03-27T10:21
求2007年8月27到30日共四天期交所數據
By Lauren
at 2009-03-26T00:31
at 2009-03-26T00:31
交易策略的通用性?
By Donna
at 2009-03-24T12:00
at 2009-03-24T12:00
程式交易之用手續費控制交易筆數/Justin
By John
at 2009-03-24T06:57
at 2009-03-24T06:57