Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Generic Indicator Overlay on price

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

    #16
    Hello outsource,

    Thank you for the reply.

    This may be done like so:

    Code:
    protected override void OnBarUpdate(){
       ...
    
       if(Values[0] == Close[0]){
    
            //do something
    
        }
       ...
    }
    Remember that you are responsible for filling the Values[] array with meaningful data. A good example would be the SMA.cs in C:\Users\<user name>\Documents\NinjaTrader 7\bin\Custom\Indicator\@SMA.cs

    This is a good example of 'filling up' the Values array.

    If we may be of any further assistance, please let us know.

    Comment


      #17
      Originally posted by NinjaTrader_ChrisL View Post
      Hello outsource,

      Thank you for the reply.

      This may be done like so:

      Code:
      protected override void OnBarUpdate(){
         ...
      
         if(Values[0] == Close[0]){
      
              //do something
      
          }
         ...
      }
      Remember that you are responsible for filling the Values[] array with meaningful data. A good example would be the SMA.cs in C:\Users\<user name>\Documents\NinjaTrader 7\bin\Custom\Indicator\@SMA.cs

      This is a good example of 'filling up' the Values array.

      If we may be of any further assistance, please let us know.
      I tried it before,it doesn`t work.The code you`ve provided fires alerts non stop.Is there a real example that would really work?

      Comment


        #18
        Hello outsource,

        Thanks for the follow-up

        Can you please post your code so I may look into this further?

        I look forward to your reply.

        Comment


          #19
          Originally posted by NinjaTrader_ChrisL View Post
          Hello outsource,

          Thanks for the follow-up

          Can you please post your code so I may look into this further?

          I look forward to your reply.
          Ok, here it is(please, check the attached):
          Attached Files

          Comment


            #20
            Originally posted by NinjaTrader_ChrisL View Post
            Hello outsource,

            Thanks for the follow-up

            Can you please post your code so I may look into this further?

            I look forward to your reply.
            Hi,Chris,

            so is there any news for that one?

            Comment


              #21
              Here's a version that will play the alert a max of 1x per bar.


              Also, there was a runtime error with the indicator trying to reference a prior bar on the first bar of the chart. That has been corrected
              Attached Files

              Comment


                #22
                Thank you for the post sbgtrading.

                Comment


                  #23
                  Originally posted by sbgtrading View Post
                  Here's a version that will play the alert a max of 1x per bar.


                  Also, there was a runtime error with the indicator trying to reference a prior bar on the first bar of the chart. That has been corrected
                  Hi, sbg,

                  was not an intention to just switch alerts for each bar.The point was to get an alert when the price touches the plot line.That was the only purpose.

                  Comment


                    #24
                    I think it`s time to switch platforms and brokerage.You guys are decade too late comparing the other brokerage and platforms.Can`t even put together an indicator that been hanging here for a Decade!

                    Wish your still in the business in a couple of years from now.

                    Cheers!

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                    0 responses
                    579 views
                    0 likes
                    Last Post Geovanny Suaza  
                    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                    0 responses
                    334 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by Mindset, 02-09-2026, 11:44 AM
                    0 responses
                    101 views
                    0 likes
                    Last Post Mindset
                    by Mindset
                     
                    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                    0 responses
                    554 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by RFrosty, 01-28-2026, 06:49 PM
                    0 responses
                    551 views
                    1 like
                    Last Post RFrosty
                    by RFrosty
                     
                    Working...
                    X