Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Please help!!! how can i identify which forex pair just gave me an alert

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Please help!!! how can i identify which forex pair just gave me an alert

    I have a indicator play a certain alert sound when a certain condition was met on the chart.

    But I need to figure out how to program such that the forex pair (instrument) give me an alert can be identified.
    ie Need to extract the instrument name somehow

    I also have a (.wav) sound I.D. file for each forex pair.

    #2
    JC2000, for this you can work with the Instrument class - please see the properties it offers here - http://www.ninjatrader.com/support/h...instrument.htm

    Comment


      #3
      Originally posted by JC2000 View Post
      I have a indicator play a certain alert sound when a certain condition was met on the chart.

      But I need to figure out how to program such that the forex pair (instrument) give me an alert can be identified.
      ie Need to extract the instrument name somehow

      I also have a (.wav) sound I.D. file for each forex pair.
      How do you mean? Are you generating the sound with PlaySound() or with Alert()?

      Comment


        #4
        it just mean that the alert command will tell me which forex pair had met a certain condition ---ie such as a EMA cross over

        Comment


          #5
          Hi Koganam,

          I forget to mention that I generate the sound with Alert.
          Is Playsound a better command & what is the advantages?

          Comment


            #6
            Originally posted by JC2000 View Post
            Hi Koganam,

            I forget to mention that I generate the sound with Alert.
            Is Playsound a better command & what is the advantages?
            If you generate it with Alert(), then you just need to include the name of the instrument in the alert text.

            Example:

            Code:
            Alert("myBigMoneyAlert", NinjaTrader.Cbi.Priority.High, Instrument.MasterInstrument.Name + ": Reached  threshold to start making megabucks.", "Alert1.wav", 10, Color.Black, Color.Yellow);

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by CarlTrading, 03-31-2026, 09:41 PM
            1 response
            152 views
            1 like
            Last Post NinjaTrader_ChelseaB  
            Started by CarlTrading, 04-01-2026, 02:41 AM
            0 responses
            89 views
            1 like
            Last Post CarlTrading  
            Started by CaptainJack, 03-31-2026, 11:44 PM
            0 responses
            131 views
            2 likes
            Last Post CaptainJack  
            Started by CarlTrading, 03-30-2026, 11:51 AM
            0 responses
            127 views
            1 like
            Last Post CarlTrading  
            Started by CarlTrading, 03-30-2026, 11:48 AM
            0 responses
            107 views
            0 likes
            Last Post CarlTrading  
            Working...
            X