NexusFi: Find Your Edge


Home Menu

 





Chart time frame into alert


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one Tasker_182 with 4 posts (0 thanks)
    2. looks_two Beljevina with 3 posts (2 thanks)
    3. looks_3 Quick Summary with 1 posts (0 thanks)
    4. looks_4 lblanks with 1 posts (0 thanks)
    1. trending_up 3,454 views
    2. thumb_up 2 thanks given
    3. group 3 followers
    1. forum 8 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
 
Tasker_182's Avatar
 Tasker_182 
Cedar Rapids, iowa
Legendary Market Wizard
 
Experience: Intermediate
Platform: Ninjatrader
Broker: Ninjatrader - Continuum
Posts: 716 since Aug 2009
Thanks Given: 476
Thanks Received: 1,405

Hello,

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


Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Hungary Called for Magyar at 97pct, Ending 16-Year Orban …
Prediction Markets & Event Contracts
Powell in 48 Hours: Word Markets Give 78% on Inflation, …
Prediction Markets & Event Contracts
Prediction Markets Expiry Day: Trump Eyes War Exit, $230 …
Prediction Markets & Event Contracts
Weekend Update: First Qatari LNG Transit Attempted -- IR …
Traders Hideout
Bookmap Global Plus Lifetime + Lifetime Addons For Sale
Platforms and Indicators
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
24 thanks
2026 Jlab journal
10 thanks
Lady Vols Primer: Trading Volatility Journal
7 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Trying to learn Volume and price action correlation
5 thanks
  #3 (permalink)
 
Beljevina's Avatar
 Beljevina 
Toronto, Canada
 
Experience: Advanced
Platform: NinjaTrader, SierraCharts
Broker: Amp/CQG, IB
Trading: CL, GC, 6E, ES, RTY, EURUSD, GBPJPY, AUDUSD
Posts: 352 since Sep 2010


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.


Follow me on X Reply With Quote
  #4 (permalink)
 
Tasker_182's Avatar
 Tasker_182 
Cedar Rapids, iowa
Legendary Market Wizard
 
Experience: Intermediate
Platform: Ninjatrader
Broker: Ninjatrader - Continuum
Posts: 716 since Aug 2009
Thanks Given: 476
Thanks Received: 1,405


Beljevina View Post
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.

Thank-you


Started this thread Reply With Quote
  #5 (permalink)
 
Beljevina's Avatar
 Beljevina 
Toronto, Canada
 
Experience: Advanced
Platform: NinjaTrader, SierraCharts
Broker: Amp/CQG, IB
Trading: CL, GC, 6E, ES, RTY, EURUSD, GBPJPY, AUDUSD
Posts: 352 since Sep 2010

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:

 
Code
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:
 
Code
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.


Follow me on X Reply With Quote
  #6 (permalink)
 
Tasker_182's Avatar
 Tasker_182 
Cedar Rapids, iowa
Legendary Market Wizard
 
Experience: Intermediate
Platform: Ninjatrader
Broker: Ninjatrader - Continuum
Posts: 716 since Aug 2009
Thanks Given: 476
Thanks Received: 1,405


Beljevina View Post
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:

 
Code
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:
 
Code
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.


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.


Thank-you!


Started this thread Reply With Quote
  #7 (permalink)
 
Tasker_182's Avatar
 Tasker_182 
Cedar Rapids, iowa
Legendary Market Wizard
 
Experience: Intermediate
Platform: Ninjatrader
Broker: Ninjatrader - Continuum
Posts: 716 since Aug 2009
Thanks Given: 476
Thanks Received: 1,405

Just to finish up, here is what i ended up doing:

Alert("myAlert3", NinjaTrader.Cbi.Priority.Medium, "Candle touch UP on: " +BarsPeriod.Value.ToString() +" "+ BarsPeriod.Id.ToString()+" Chart", "Chime-4.wav", 55, Color.Aquamarine, Color.Black);

So in the NT Alerts Dialog box it would say, " Candle touch UP on 1 minute Chart".

Thanks for pointing me in the right direction!


Started this thread Reply With Quote
  #8 (permalink)
 lblanks 
South Carolina
 
Experience: Intermediate
Platform: Ninjatrader
Broker: Zen Fire
Trading: 6E, ES
Posts: 51 since Jun 2011
Thanks Given: 126
Thanks Received: 15


Beljevina View Post
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:

 
Code
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:
 
Code
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.

Why do you prefer twittermail?


Reply With Quote
  #9 (permalink)
 
Beljevina's Avatar
 Beljevina 
Toronto, Canada
 
Experience: Advanced
Platform: NinjaTrader, SierraCharts
Broker: Amp/CQG, IB
Trading: CL, GC, 6E, ES, RTY, EURUSD, GBPJPY, AUDUSD
Posts: 352 since Sep 2010


lblanks View Post
Why do you prefer twittermail?

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.


Follow me on X Reply With Quote




Last Updated on June 15, 2012


© 2026 NexusFi®, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Downloads - Top
no new posts