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 josh18955, 03-25-2023, 11:16 AM
            6 responses
            435 views
            0 likes
            Last Post Delerium  
            Started by FAQtrader, Today, 03:35 PM
            0 responses
            3 views
            0 likes
            Last Post FAQtrader  
            Started by rocketman7, Today, 09:41 AM
            5 responses
            18 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Started by frslvr, 04-11-2024, 07:26 AM
            9 responses
            126 views
            1 like
            Last Post caryc123  
            Started by selu72, Today, 02:01 PM
            1 response
            12 views
            0 likes
            Last Post NinjaTrader_Zachary  
            Working...
            X