看板 Trading 關於我們 聯絡資訊
If MarketPosition = 1 Then ExitLong ("多單停損") next Bar at EntryPrice*0.98 stop; If MarketPosition = -1 Then Exitshort ("空單停損") next Bar at EntryPrice*1.02 stop; ps: "XX停損" 在程式裡我是用英文打,只是要PO上來才改一下 這剛試出來的,請問有沒有問題,我看了一下應該OK @@? ※ 引述《timwen (沒有我的新竹)》之銘言: : if marketposition>0 and c<0.98*entryprice(0) then begin 多停損 : if marketposition<0 and c>1.02*entryprice(0) then begin 空停損 : entryprice 是進場價格的函數 : (0) 是最近一口 : (1) 前一口 .....以此類推 : ※ 引述《ainor (><)》之銘言: : : 應該說是這口單"進場價格"的幾% : : 例如今天多單建在5000點 停損2% 則跌到4900 就停損 : : 或 空單建在9000點 停損2% 則漲到9180時才停損 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 124.218.61.79 ※ 編輯: ainor 來自: 124.218.61.79 (09/20 00:35)
timwen:在TS記得不要用中文就好 09/20 01:08