计数器
Params
//
Vars
Series<Numeric> s_counter;
Global Numeric g_counter;
Events
OnBarOpen(ArrayRef<Integer> indexs)
{
g_counter=0;
}
OnBar(ArrayRef<Integer> indexs)
{
s_counter = s_counter +1;
g_counter = g_counter +1;
Commentary("s_counter:"+text(s_counter));
Commentary("g_counter"+text(g_counter));
}