Hello,

i tried something but code doesn't reset the Ticknumber after NewBar.
I cannot see the mistake.
Anybody can help?

PrevDT = StaticVarGet("DateTime");
DT = LastValue(DateTime());
NewBar = DT != PrevDT;
StaticVarSet("DateTime",DT);

prevVol = StaticVarGet("Vol");
VOL = LastValue(V);
NewTick = Vol != PrevVol;
StaticVarSet("Vol", VOL);

if( NewBar ) {
StaticVarSet("Ticknumber", 0);
TN = 0;
}

if( NewTick AND NOT NewBar) {
        TN = StaticVarGet("Ticknumber");
        StaticVarSet("Ticknumber", ++TN);       
}


Regards
Robert


--- In [email protected], "rhoemke" <[EMAIL PROTECTED]> wrote:
>
> Hello,
> 
> how can i find out how many ticks are already in a tickbar?
> I.e. a 30 tick bar and how do i know that it has already X-ticks "in
it"?
> 
> Thx.
> 
> Regards
> Robert
>


Reply via email to