计数器

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));

}

posted @ 2024-05-31 09:43  静听微风tom  阅读(7)  评论(0编辑  收藏  举报