[問題] 關於限制一日虧損的語法

看板Trading (金融交易)作者 (御天)時間15年前 (2010/02/22 14:50), 編輯推噓1(100)
留言1則, 1人參與, 最新討論串1/1
這是ts的easylanguage vars: dayLoss(50); vars: mc(0), entryCount(1); if date <> date[1] then begin dayLoss = 50; entryCount = 1; end; mc = marketposition * currentcontracts; if mc[1] = 1 and mc = 0 then dayLoss = dayLoss + exitprice(0) - entryprice(0); if mc[1] = -1 and mc = 0 then dayLoss = dayLoss + entryprice(0) - exitprice(0); if dayLoss <= 0 then entryCount = 0; 請問這樣寫哪裡有錯嗎?? -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 118.165.15.234

02/24 20:34, , 1F
少了一些begin
02/24 20:34, 1F
文章代碼(AID): #1BWYa-7N (Trading)
文章代碼(AID): #1BWYa-7N (Trading)