Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
I am working with an alert indicator and i want to be able to identify the chart that the alert was issued from. Is there anyway to get the timeframe or name of the chart so that i can add it into the alert box test message output?
Thanks
Can you help answer these questions from other members on NexusFi?
TOS or NT7? Assuming it's NT7 and it is not a DLL driven alert,one can add to the Ninjascript the "Print" command to get text into the NT Output window, and use things like Instrument.Fullname and BarsPeriod.Value.ToString() to view the timeframe of the chart. It's also possible to use text-to-speech within Windows, or, tweet alerts out, to be received by a dedicated twitter client, and thus get alert popups.
Sorry I should have been more specific. Yes, NinjaTrader 7. I am of course wanting to do it dynamically as i use several charts and time frames but same indictator.
OK. I'm not sure if I answered your question, or what level of help you are looking for.
Here's an example of code to place in the routine of your Ninjascript where the alert has been confirmed:
which will give text in the NT Output window as follows:
My personal preference is to send an email to a twittermail twitter account, which will then give a screen tweet popup in a separate client running on a PC somewhere, alerting you to the trading condition/signal. I like to use twirl for the receiving client.
Not sure if you're looking for help right down to coding it into an indicator. I might be able to help with that - depends on the indicator.
I already have the indicator sending a message to the NT Alerts window. What i don't know is how to get (in your example) "5M" into the message that displays in the alerts windows so that when the indicator triggers I know what timeframe the alert is from. It seems like the code segment: BarsPeriod.Value.ToString() + "M" will be what i need.
OK. I'm not sure if I answered your question, or what level of help you are looking for.
Here's an example of code to place in the routine of your Ninjascript where the alert has been confirmed:
Print ("Red triangle alert printed in " + Instrument.MasterInstrument.Name + " on "+ BarsPeriod.Value.ToString() + "M at " + Time[0].ToString() + " Price is " + Close[0].ToString() );
which will give text in the NT Output window as follows:
Red triangle alert printed in 6E on 5M at 6/8/2012 6:45:00 AM Price is 1.2458
My personal preference is to send an email to a twittermail twitter account, which will then give a screen tweet popup in a separate client running on a PC somewhere, alerting you to the trading condition/signal. I like to use twirl for the receiving client.
Not sure if you're looking for help right down to coding it into an indicator. I might be able to help with that - depends on the indicator.
It allows me to receive tweets, by sending an alert to an email address, and that is an easy 1-command thing in a NT indicator. (Yes, I have seen one can tweet right from NT code, but my sense is there is more programming work, and I've just never delved into it.)
And then, with tweets, I can receive them in a client, with a screen popup, an added audio alert, leaving me a recent list of tweets/alerts in a compact screen real-estate respecting (and opaque) twitter client (twirl) - in other words, the whole visual tweet notification thing/approach is nicely address for me, and my trading.
Oh, and should you have an indicator that allows e-mail notification as part of it's pre-programmed code, you can just put in your twittermail address, and be receiving those notifications by twitter. Pretty handy IMO.