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 DJ888, Today, 10:57 PM
            0 responses
            6 views
            0 likes
            Last Post DJ888
            by DJ888
             
            Started by MacDad, 02-25-2024, 11:48 PM
            7 responses
            158 views
            0 likes
            Last Post loganjarosz123  
            Started by Belfortbucks, Today, 09:29 PM
            0 responses
            7 views
            0 likes
            Last Post Belfortbucks  
            Started by zstheorist, Today, 07:52 PM
            0 responses
            7 views
            0 likes
            Last Post zstheorist  
            Started by pmachiraju, 11-01-2023, 04:46 AM
            8 responses
            151 views
            0 likes
            Last Post rehmans
            by rehmans
             
            Working...
            X