在当前bar(最后一根bar)计算出在当前bar前面的第三根bar是最低点,如何在当前bar的前面第三根bar low位置标出文字?下面代码
回溯找到最低点或最高点以后,如何在找到bar山重新显示?貌似当前bar是不能渲染之前的历史bar了。
OnBar(ArrayRef<Integer> indexs)
{
showBottomIndex=-1;
showTopIndex=-1;
if(BarStatus==2)
{
for i = 0 to length -1//回溯N跟 bar
{
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxx
index = CurrentBar -i ;
if (low_1 > top and low_2 <= top)
{
showBottomIndex=index;//显示最低点bar找到了
}
if (high_1 < bot and high_2 >= bot)
{
showTopIndex=index; //显示最高点bar找到了
}
}
}
if (showBottomIndex >0 and (BarCount- CurrentBar) ==showBottomIndex )
{
plt1.text("letter1",LOw,"▲");
}
if (showTopIndex>0 and (BarCount- CurrentBar) ==showTopIndex )
{
plt1.text("letter1",high,"▼");
}
}
当根bar是最低就标记,不要从未来往前面画