为了防止隔日跳空损失太多
在不改动原本只用日盘作为进场策略的情况下
想用全天的台指期价格来做为停损停利
请问MultiCharts有办法做到吗
原本只用日盘的写法是这样
if marketposition>0
then begin
setstoploss(StopLoss*currentcontracts*200);
setprofittarget(StopProfit*currentcontracts*200);
end;
我想到的方法是 data1 只用台指期日盘时段的资料
策略盘段只用data1资料
另外新增一个data2: 台指期的日盘+夜盘资料
停损停利才用data2资料
但setstoploss跟setprofittarget指令有办法用到data2吗?
或者是这样写
if marketposition>0 then begin
if c of data2<entryprice-StopLoss then sell next bar at market;
if c of data2>entryprice+StopProfit then sell next bar at market;
end;
可是这样写 好像只有在跑完整个k bar之后 才会做停损停利
而不是跟着即时价格停损停利
想请教一下怎么用日+夜盘的即时价格来做停损停利
谢谢