上一次开多价:ref(enterprice,typebar(1,1));
上一次平多价:ref(exiprice,typebar(1,2));
上一次开空价:ref(enterprice,typebar(1,3));
上一次平空价:ref(exitprice,typebar(1,4));
那最近一次开多之后的最高最低价怎么写?
最近一次开空之后的最高最低价怎么写?
开多后的最高最低价:
hhv(h,typebar(1,1))
llv(l,typebar(1,1))
开空后的最高最低价:
hhv(h,typebar(1,3))
llv(l,typebar(1,3))
开多加个holding=0的条件
平多加个enterbars>0的条件
上一次开多价:ref(enterprice,typebar(1,1));
上一次平多价:ref(exiprice,typebar(1,2));
上一次开空价:ref(enterprice,typebar(1,3));
上一次平空价:ref(exitprice,typebar(1,4));
哇偶,这可以把我前几次记录连续开仓给搞定了。
本来是ref的ref的。。 用着函数给每次开仓只要 i:=i+1;
然后 if(i=4,ref(enterprice,typebar(3,1)),DRAWNULL); 可以取到连续4次开仓后的第1次价格。 good 。。我上次还说让你们开发个函数来表明连续开仓后第几次的开仓价格函数。
可怜我发觉你们给反复ref方案决定还是自己每次开仓赋值一次开仓价算了。 后来发觉要是开10次要悲剧啊。