PDA

View Full Version : Error with FirstTickOfBar in an indicator


SuzyG
02-10-2007, 06:07 PM
Hi

I have put FirstTickOfBar in the OnBarUpdate event of my indicator. I get the following error:

"The name 'FirstTickOfBar' does not exist in the current context."

Is this available in strategies only and not indicators? If so, what will give me a similar result? I tried using Bars.PercentComplete, but it didn't work out.

Thank you. SuzyG

NinjaTrader_Ray
02-11-2007, 03:45 AM
Yes only on strategies. You would have to check when the CurrentBar value changes, that will be the first tick of bar.

Ray

SuzyG
02-11-2007, 05:03 AM
I found an example of youranswer here:

http://ninjatrader.mywowbb.com/view_topic.php?id=1455&forum_id=14&highlight=Curre ntBar

Thanks.