NexusFi: Find Your Edge


Home Menu

 





MessageBox PopUp- Alert


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one max-td with 2 posts (5 thanks)
    2. looks_two MXASJ with 2 posts (7 thanks)
    3. looks_3 Quick Summary with 1 posts (0 thanks)
    4. looks_4 Jura with 1 posts (3 thanks)
    1. trending_up 9,317 views
    2. thumb_up 15 thanks given
    3. group 1 followers
    1. forum 5 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
 
max-td's Avatar
 max-td 
Frankfurt
 
Experience: Intermediate
Platform: NinjaTrader
Trading: FGBL 6E B4
Posts: 1,752 since Jun 2009
Thanks Given: 2,309
Thanks Received: 927

Here is the trick with using the Windows PopUp MessageBox as an alert i talked about with perry.

this win-popup-window comes as a "always on top-popup" in the middle of your sreen if your signal is valid + you have to klick it away / klick OK to proceed with your trading-stuff. But it does not freeze or stop NT working somehow - no problems with this.
it can be very good to catch your attention but can also be annoying, depending on how fast your charts + signals are.

its a while back i used it - so i dont rember all details - but this if (!Historical) is important as far as i know.

it can be used in all kind of indicators / conditions but it should be used with a kind of cross-over conditions or something like this that is valid only in 1 or 2 Bars --
otherwise (iE if you code something like : if (EMA10 > EMA 50) ) you get a popup every single bar this condition is true !

 
Code
                            
        if   (  your condition  )

        
        { 

                    
if (!
Historical
MessageBox.Show("#########  NQ  NQ NQ   #########!   DOT Alert !!   
#########\n!   Ready to Enter the Market !  ******#########!"
);   

    
        } 
The red stuff comes up as text in the box.

Idea :
Maybe there is also remove-comand working / available for this, like for the other drawobjects - but i dont know.

Have Fun with it !

BTW - as said yet : this is NOT an offical NT-function - so its not supported from the NT-forum- guys - whatever this means ....


max-td
Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
April FOMC Minutes: Most Divided Fed Since 1992 -- Many …
Traders Hideout
March Jobs Report Update: 178K Beat vs 59K Expected, Wag …
Traders Hideout
Coinbase Launches Regulated Crypto Futures Across 26 Eur …
Cryptocurrency
Tradeify 3.0 Overhauls Futures Prop Firm Model -- One-Ti …
Funded Trading Evaluation Firms
Third Circuit Backs Kalshi in Landmark Ruling -- Predict …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
21 thanks
2026 Jlab journal
10 thanks
Trying to learn Volume and price action correlation
8 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Hello Im new here
5 thanks
  #3 (permalink)
 MXASJ 
Asia
 
Experience: Beginner
Platform: NinjaTrader, TOS
Posts: 796 since Jun 2009
Thanks Given: 109
Thanks Received: 801


You might need to add using System.Windows.Forms to that... but check it first.


Reply With Quote
Thanked by:
  #4 (permalink)
 
max-td's Avatar
 max-td 
Frankfurt
 
Experience: Intermediate
Platform: NinjaTrader
Trading: FGBL 6E B4
Posts: 1,752 since Jun 2009
Thanks Given: 2,309
Thanks Received: 927

Hey MX,
you are right , thanks a bunch for remembering that !

so folks, to make the popup work please add this :
using System.Windows.Forms;

to the very first section in the indicator-codes -
example here :

 
Code
                            
 #region Using declarations
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Xml.Serialization;
using NinjaTrader.Cbi;
using NinjaTrader.Data;
using NinjaTrader.Gui.Chart;

using System.Windows.Forms;
#endregion 
max
-


max-td
Started this thread Reply With Quote
  #5 (permalink)
 
Jura's Avatar
 Jura   is a Vendor
 
Posts: 775 since Apr 2010
Thanks Given: 2,352
Thanks Received: 690

Great thread, quite helpful for people who want to create a message pop-up.


max-td View Post
Hey MX,
you are right , thanks a bunch for remembering that !

so folks, to make the popup work please add this :
using System.Windows.Forms;

to the very first section in the indicator-codes -
example here :

 
Code
                            
 #region Using declarations
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Xml.Serialization;
using NinjaTrader.Cbi;
using NinjaTrader.Data;
using NinjaTrader.Gui.Chart;
 
using System.Windows.Forms;
#endregion 
max
-

Indeed. Here's how I implemented it some time ago (just as an example for other people, I don't want to show off my non-existing programming skills. )

 
Code

// Showing the popup (if on)
if( popup == true && !Historical)
{
System.Windows.Forms.MessageBox.Show(DateTime.Now.ToString() + "\n\nThe MACD just crossed above it's average above \nthe " + bullishZone + " level,"
+ "in instrument " + Instrument.FullName + ".", Instrument.FullName + " MACD Alert!");
}
Regards,


Reply With Quote
Thanked by:
  #6 (permalink)
 MXASJ 
Asia
 
Experience: Beginner
Platform: NinjaTrader, TOS
Posts: 796 since Jun 2009
Thanks Given: 109
Thanks Received: 801

More usage details here:

MessageBox.Show Method (System.Windows.Forms)

I've just added this to an indicator I'm working on:

 
Code
                            
MessageBox.Show("Hedge Instrument field is blank or the same as the Quoted instrument. This will create Overflow errors.""Warning!"MessageBoxButtons.OKMessageBoxIcon.Exclamation ); 

Probably not something you want to use all the time but useful in some situations.


Reply With Quote
Thanked by:




Last Updated on April 24, 2010


© 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