Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Alarm if Close > Indicator

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

    Alarm if Close > Indicator

    In marketanalyzer you can select an indicator. If you want an alarm you can select an indicator and alarm conditions for the indicator.

    But how can I setup an alarm when price is above a indicator.
    If I put this in a indicator it works fine (Keltner Channel)
    Code:
    	if (Close[0] > upper){
    				
    				Alert("myAlert", NinjaTrader.Cbi.Priority.High, "Momentum UP", "Alert1.wav", 10, Color.Black, Color.Yellow);
    			}
    This works fine when you put the indicator up on a chart, but how can I apply this alarm without to have a chart open.. So I want to use Market Analyzer..

    #2
    Hello no111,

    In MarketAnalyzer you can apply this and it will process the alert command if the conditions are true.

    You can add indicators to the market analyzer by Right Clicking > Columns > Double Click Indicator and then choose your indicator.


    Another approach is using the alert interface within Market Analyzer. For this you have to change the code so that it generates one value when conditions are true and a different value when false. Snippet below sets plot as 1 when true and 0 otherwise. You could then be alerted when the value of the indicator column == 1.

    if (Close[0] > upper)
    Plot0.Set(1);

    else
    Plot0.Set(0);
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Ok thanks, I made it working thanks to you!

      Comment


        #4
        How can I add dataseries (e.g. 15min chart), because it's different from the calcution on the chart..

        Comment


          #5
          Let me explain it better.
          I have a 15min chart with NQ the upper keltner has a value of 2357.
          But marketanalyzer gives a value of 2364, with the same settings, 15min chart.

          See below:

          Last edited by no111; 02-10-2011, 10:31 AM.

          Comment


            #6
            A common reason for seeing a discrepancy between chart values and market analyzer values is different data. Make sure the session template is the same on chart as market analyzer. Also verify days to load is the same.

            On a chart this is adjusted in the right click > Data Series screen.
            Market analyzer: Right Click > Properties.
            Ryan M.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by wzgy0920, 04-20-2024, 06:09 PM
            2 responses
            26 views
            0 likes
            Last Post wzgy0920  
            Started by wzgy0920, 02-22-2024, 01:11 AM
            5 responses
            32 views
            0 likes
            Last Post wzgy0920  
            Started by wzgy0920, Yesterday, 09:53 PM
            2 responses
            49 views
            0 likes
            Last Post wzgy0920  
            Started by Kensonprib, 04-28-2021, 10:11 AM
            5 responses
            191 views
            0 likes
            Last Post Hasadafa  
            Started by GussJ, 03-04-2020, 03:11 PM
            11 responses
            3,230 views
            0 likes
            Last Post xiinteractive  
            Working...
            X