Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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
    BertrandNinjaTrader Customer Service

    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 sephichapdson, Today, 11:36 PM
            0 responses
            1 view
            0 likes
            Last Post sephichapdson  
            Started by bortz, 11-06-2023, 08:04 AM
            47 responses
            1,612 views
            0 likes
            Last Post aligator  
            Started by jaybedreamin, Today, 05:56 PM
            0 responses
            9 views
            0 likes
            Last Post jaybedreamin  
            Started by DJ888, 04-16-2024, 06:09 PM
            6 responses
            19 views
            0 likes
            Last Post DJ888
            by DJ888
             
            Started by Jon17, Today, 04:33 PM
            0 responses
            6 views
            0 likes
            Last Post Jon17
            by Jon17
             
            Working...
            X