日线在N周期内大于一个固定值A1,小于一个固定值A2,求这范围内开盘价、收盘价、最高价、最低价,求4个价合并在一起的众数
请老师指导下公式,是否可用数组来实现?
是用 ArrayInsertRange 函数吗?数组合并后,求数组的众数
OnBar(ArrayRef<Integer> indexs) { Range [0:1] numericstoarray(Open,Length,myarray,True); myarray[0]; print(Text(myarray[0])); }
Params Series<Numeric>valuel(1); Numeric length(5); ArrayRef<Numeric>myarray; Bool mark(True);
Vars Numeric i;
Begin If(mark==True) { for i = 0 to length-1 { myarray[i]=valuel[i]; } }Else { for i = 0 to length-1 { myarray[i] = valuel[length-1-i]; } } Return true; End
实盘时结果为什么不一样,错在那,求大神指点
OnBarClose(ArrayRef<Integer> indexs)原来是放这里
请老师指导下公式,是否可用数组来实现?
是用 ArrayInsertRange 函数吗?数组合并后,求数组的众数
OnBar(ArrayRef<Integer> indexs)
{
Range [0:1]
numericstoarray(Open,Length,myarray,True);
myarray[0];
print(Text(myarray[0]));
}
Params
Series<Numeric>valuel(1);
Numeric length(5);
ArrayRef<Numeric>myarray;
Bool mark(True);
Vars
Numeric i;
Begin
If(mark==True)
{
for i = 0 to length-1
{
myarray[i]=valuel[i];
}
}Else
{
for i = 0 to length-1
{
myarray[i] = valuel[length-1-i];
}
}
Return true;
End
实盘时结果为什么不一样,错在那,求大神指点
OnBarClose(ArrayRef<Integer> indexs)原来是放这里