Modificate Bar Timer Hybrid indicator to use it as regular alarm

Hello guys,

my goal is to have an indicator, where i get the last second of an bar to make an alert combined with a strategy, fires when the bar closes.

The in ninjatrader included BarTime Counter cannot be accessed by the Alerts Condition for indicators.

So i searched an already modified one. I found the BarTimerHybrid indicator, which is quite good:

In Alerts you can use the indicator as condition:

BUT the Numeric value seems not to work. I tried several values and expressions equal, less etc.

Nothing works - no Alarm.

I think the reason is, that the indicator does not plots out a numeric value? I tried to change some variables, but i do not get it.

Maybe someone here has an idea what to do or what to change, that this works out.

Thank you very much

Trib

Hi I am the author - I am not sure if you could use this in a strategy as it’s really just a utility to assist with time stuff. You could certainly flash the panel or emit a sound alert at 1 second before the end of the bar - that’s the core design principle - but in my experience you’re better setting it at say 3-5 seconds to give you time to react, etc.. By the way there is a version 9 out which is way better IMHO :grin: I will try and post it here but otherwise it’s in NexusFi dot com.

Hello Mindset,

thank you for your response. Maybe it is possible to plot an extra int out with just a number such as 50 instead of a string 00:00:50?

Sadly, i am not a programmer, so i cannot find the codeline, where to edit it. Maybe you can help me out?

This would be great

yes that’s possible but in real time getting say the last second of a bar is fraught with difficulty. racing conditions. Gaps, large orders etc all can mean the last second ‘disappears’. but let me see what i can do for you

This would be phantastic. With this it is possible to have an alarm near closing Bars. I think many others would like that too.

Thank you for your support

I tried it myself in the editor, but when i try to change the string into int, it does not work. I always get an error. I do not have the skills for that i think :relieved_face: