I have an indicator that I use CalculateOnBarClose = false so it'll update tick-by-tick. I'd like it to play a wav file if a certain condition is met, but I don't want it to play over and over, just when the bar is closed. Is this possible?
Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
Looking for LastTickOfBar
Collapse
X
-
Looking for LastTickOfBar
There is a FirstTickOfBar but not a LastTickOfBar.
I have an indicator that I use CalculateOnBarClose = false so it'll update tick-by-tick. I'd like it to play a wav file if a certain condition is met, but I don't want it to play over and over, just when the bar is closed. Is this possible?Tags: None
-
Originally posted by cunparis View PostThere is a FirstTickOfBar but not a LastTickOfBar.
I have an indicator that I use CalculateOnBarClose = false so it'll update tick-by-tick. I'd like it to play a wav file if a certain condition is met, but I don't want it to play over and over, just when the bar is closed. Is this possible?RayNinjaTrader Customer Service
-
Originally posted by NinjaTrader_Ray View PostActually.
For time based bars my last response is true, for tick based bars, you can check the TickCount property:
For Volume based bars you could just check Volume[0].
For minute charts, I'm not sure what you mean by volume[0], you mean check to see if the volume is zero? That would tell me the first tick of the next bar but not the end of the bar that I want right?
I could also use Time[0]. for a 5 min chart I could make sure the minutes were dividable by 5. A bit complicated. In fact for the minute I don't need last tick of bar, I just want to know when the bar is closed.
Comment
-
Originally posted by cunparis View PostGood idea for the tick count.
For minute charts, I'm not sure what you mean by volume[0], you mean check to see if the volume is zero? That would tell me the first tick of the next bar but not the end of the bar that I want right?
I could also use Time[0]. for a 5 min chart I could make sure the minutes were dividable by 5. A bit complicated. In fact for the minute I don't need last tick of bar, I just want to know when the bar is closed.RayNinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by samish18, Today, 10:13 AM
|
0 responses
2 views
0 likes
|
Last Post
by samish18
Today, 10:13 AM
|
||
Started by kenz987, Yesterday, 10:20 AM
|
2 responses
12 views
0 likes
|
Last Post
by kenz987
Today, 10:13 AM
|
||
Started by nicthe, 08-23-2023, 07:53 AM
|
7 responses
196 views
0 likes
|
Last Post
by nicthe
Today, 09:26 AM
|
||
Started by nicthe, Today, 09:24 AM
|
0 responses
5 views
0 likes
|
Last Post
by nicthe
Today, 09:24 AM
|
||
Started by stalt, 12-28-2015, 01:36 PM
|
6 responses
1,536 views
0 likes
|
Last Post
by giulyko00
Today, 09:16 AM
|
Comment