你好,想求教一下一个问题,关于参数的, 我在公式里设置Numeric p(5); 在平仓语句里
myexitprice =L - p * MinPoint;
Commentary("BK1跟踪止损="+Text(L_myexitprice));
If(L <= L_myexitprice )
{
Sell(0,Min(O,L_myexitprice));
Commentary("BK1跟踪止损离场");
}
这个值计算时对时错的,然后自己实验了下,把常量参数带入计算容易出错,不知是我方法不对,还是有用法上需要规避的?还想请教下
Params
Numeric p(50);
Numeric l(20);
Vars
Series<Numeric> my_p;
Series<Numeric> ma1;
Events
OnBar(ArrayRef<Integer> indexs)
{
ma1=Average(c,l);
PlotAuto("ma1",ma1);
if (c[1]>ma1[1])
{
Commentary("-----------大-------------");
my_p = c - p;
Commentary("my_p="+Text(my_p));
}
这个计算结果也不太对 从C(2873)-p(50) 因该等于2823。
}
是公式需要重新删除,在加载么?好像这样计算的数值就是对的
你打开公式应用设置 看看里面参数到底是几