作者s680510 (御天)
看板Trading
标题[问题] 关於限制一日亏损的语法
时间Mon Feb 22 14:50:36 2010
这是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
1F:推 lovebeast:少了一些begin 02/24 20:34