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 8,559 views
    2. thumb_up 15 thanks given
    3. group 1 followers
    1. forum 5 posts
    2. attach_file 0 attachments




 
Search this Thread

MessageBox PopUp- Alert

  #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?
How to apply profiles
Traders Hideout
REcommedations for programming help
Sierra Chart
Better Renko Gaps
The Elite Circle
Exit Strategy
NinjaTrader
Increase in trading performance by 75%
The Elite Circle
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
36 thanks
Tao te Trade: way of the WLD
24 thanks
Spoo-nalysis ES e-mini futures S&P 500
21 thanks
Bigger Wins or Fewer Losses?
19 thanks
GFIs1 1 DAX trade per day journal
16 thanks
  #3 (permalink)
 MXASJ 
Asia
 
Experience: Beginner
Platform: NinjaTrader, TOS
Posts: 796 since Jun 2009
Thanks Given: 109
Thanks Received: 800


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: 800

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


© 2024 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 - Privacy Policy - Downloads - Top
no new posts