+ Reply to Thread
Results 1 to 7 of 7

Popup alert message when price crosses over/under.

  1. #1
    Registered User
    Join Date
    02-10-2010
    Location
    India
    MS-Off Ver
    Office XP
    Posts
    10

    Popup alert message when price crosses over/under.

    Dear Sir,

    I have a worksheet in which I get data in real time for more than 1200 stocks. In column “O” I get 100 minute moving average value of the stock and in column “N” I get last traded value of the stock. All I wish to do is set a popup alert message whenever last traded price cross (over or under) the 100 minute moving average value (e.g. "N2" is 40.20 and "O2" is 39.25, when "N2" become 39.20 (crosses under 100MA)the alert message should popup. and when once again "N2" become 39.30 (crosses over) the alert message should popup) without interrupting the streaming data.

    I am using Office Xp.

    Thanks in advance!!!
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,963

    Re: Popup alert message when price crosses over/under.

    Here's my test:
    Attached Files Attached Files
    Ben Van Johnson

  3. #3
    Registered User
    Join Date
    02-10-2010
    Location
    India
    MS-Off Ver
    Office XP
    Posts
    10

    Re: Popup alert message when price crosses over/under.

    Dear Sir,

    Thanks for your help and prompt reply!

    The code is excellent!!

    Would you please do two little changes in the code for me?

    1. The alert message should pop up only on cross over/under. i.e. on the first up/down trigger only. (If "O2" is 38.95 and "N2" becomes 39 the alert message will pop up on the first trigger up then if next minute "N2" becomes 39.10, 39.20, 39.50 the alert message will not pop up. It will pop up whenever "O2" becomes 38.95 and "N2" becomes 38.90 only on first trigger down and not if next minute "N2" becomes 38.80, 38.70, 38.50.

    If once again "N2" becomes greater than "O2" the alert message should pop up and again if "N2" becomes lower than "O2" and so on...

    2. The Alert message should pop up for all triggered prices. i.e. if 80 stock prices crosses over/under at the same time 80 alert messages should pop up at the same time.

    Thank you very much for your help.

  4. #4
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,963

    Re: Popup alert message when price crosses over/under.

    I have modified the code to ignore changes in any cell which occur less than one minute apart; however, the requirement:

    2. The Alert message should pop up for all triggered prices. i.e. if 80 stock prices crosses over/under at the same time 80 alert messages should pop up at the same time.
    is beyond me. Maybe you can repost to get further help.
    Last edited by protonLeah; 06-01-2010 at 10:35 PM.

  5. #5
    Registered User
    Join Date
    02-10-2010
    Location
    India
    MS-Off Ver
    Office XP
    Posts
    10

    Re: Popup alert message when price crosses over/under.

    Dear Sir,


    Thanks!

    When I enter a value in column "N", I get message "Run-time error '13' Type mismatch".

    the 2nd thing required is alert message should pop up for all values that crosses over / under at the same time. I'm getting only one alert message.

    Thank you!

  6. #6
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,963

    Re: Popup alert message when price crosses over/under.

    I have corrected the error message. However I am not able to give time to your second requirement. Unless you can wait until next week, you should post a new request.
    Attached Files Attached Files
    Last edited by protonLeah; 06-01-2010 at 10:40 PM.

  7. #7
    Registered User
    Join Date
    02-10-2010
    Location
    India
    MS-Off Ver
    Office XP
    Posts
    10

    Re: Popup alert message when price crosses over/under.

    Dear Sir,

    Thank you very much for your efforts!

    Your code is excellent! but I get 1 minute data at the same time i.e. "N2" to "N1226" updates at the same time (the code works fine while we manually enter value in any one cell of column "N" but when all values updates at the same time it shows error). And I get the same error "Run-time error '13' Type mismatch".

    Any way, I'm grateful for all your help.

    Thank you very much once again!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1