Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Alerts In MA

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

    Alerts In MA

    I am having problems with alerts in MA... I want a sound file to trigger when my condition is met... it will do this the 1st time the condition is met but then not again... I have it to rearm but still does not work...

    This is a custom condition I created for a " if plot 1 if else plot 0" in a script and have the alert set for "if = 1" to go off...

    The column condition works fine , when the value = 1 it colors the comun, when the value does not = 1 it does not and if the value at a later time = 1 again it colors the column... I would like the sound alerts to work in the same way...

    Is this possible?

    Thanks for any help...

    #2
    Okay, I believe I have this worked out, at least it is working how I want through replay...

    Another ? though... is there a way to not have alerts be fired for conditions if the instrument is filtered from a separate condition?

    In other words I have some main filters in my MA, if an instrument is filtered out of the MA for a main condition then I do not want the instrument to be firing alerts for the other conditions since the instrument does not meet my basic filter requirements...

    Example, if I have a filter for volume two times 30 period volume moving average and the stock is trading 1.5 times the VMA the stock is filtered out of the MA, but if I have an alert on the stock for making a new high of day even though the instrument is filtered out of the market analyzer on the VMA it fires alerts (I dont want to know about) for the new high of day...

    If there is away around this please let me know, if there is not can you please add as a suggestion such as "if any filter conditions met no alerts"

    Thanks for the time and help!
    R.T.

    Comment


      #3
      Hello,

      Glad you got it figured out.

      On your secondary question, you would need to manually code this filtering into the strategy.

      Would suggest you put something in the UserDefinedMethods.cs file so that the filter conditions are shared between all running indicators/strategies and you can use the same filtering method on all strategies by simply calling the method from your shared methods file.



      Let me know if I can be of further assistance.

      Comment


        #4
        Hi Brett,

        Thanks for the help!

        I am by no means a programmer but think I understand what you are saying (btw, is the userdefinedmethods new to NT7?)

        anyway, so you are saying that within the UserDefinedMethods.cs I can create a line of code such as:

        If filter = True Alerts = Fasle

        and this will only effect the MA conditions? if you could please explain where to look further or the exact line of code th use it would be very helpful as I am new to this...

        Also, this is only for market analyzer conditions on indicators...

        Thanks again!
        R.T.

        Comment


          #5
          Hi tshirtdeal,

          There are two UserDefinedMethods, one for indicators and one for strategies.

          If you create a variable or function in the indicators UserDefinedMethods, that code is available in any indicator.

          So in your case, you could create a method that contains your existing volume filters and a boolean variable to keep track whether or not to alert. Something like CheckIsVolumeFiltered() , which could check your volume is two times 30 period volume moving average and the stock is trading 1.5 times the VMA. It could set a boolean such as PlayAlerts to true/false.

          Then in each of your MA indicator code, you could check whether PlayAlerts is true before playing an alert.

          For more information on working with methods please see the following help-guide article: http://www.ninjatrader.com/support/h...s_explaine.htm
          DexterNinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by GussJ, 03-04-2020, 03:11 PM
          16 responses
          3,280 views
          0 likes
          Last Post Leafcutter  
          Started by WHICKED, Today, 12:45 PM
          2 responses
          19 views
          0 likes
          Last Post WHICKED
          by WHICKED
           
          Started by Tim-c, Today, 02:10 PM
          1 response
          9 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by Taddypole, Today, 02:47 PM
          0 responses
          5 views
          0 likes
          Last Post Taddypole  
          Started by chbruno, 04-24-2024, 04:10 PM
          4 responses
          53 views
          0 likes
          Last Post chbruno
          by chbruno
           
          Working...
          X