Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Simple Indie for close of bar

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

    Simple Indie for close of bar

    I´m looking for a simple indicator which will make a sound on close of bar, if the bar is the opposite colour of the previous bar.

    I guess there is something already available.

    #2
    Hello ScottieDog,

    You would not be able to check the color a bar but you can check to see if the Close price is greater than or less than the open price which is going to determine if it is the up bar or a down bar.

    I am not aware of a Indicator that will do this but it should be fairly simple.

    For Example:
    Code:
    if(Close[0]>Open[0])
    {
    	PlaySound(@"C:\Program Files (x86)\NinjaTrader 7\sounds\Alert1.wav");
    }
    if(Close[0]<Open[0])
    {
    	PlaySound(@"C:\Program Files (x86)\NinjaTrader 7\sounds\Alert2.wav");
    }
    JCNinjaTrader Customer Service

    Comment


      #3
      But won´t that sound at the end of every bar that isn´t a Doji?

      Comment


        #4
        For instance, I want to get a sound alert when these bars close...... See attachment
        Attached Files

        Comment


          #5
          Hello ScottieDog,

          Thanks for the image and the clarification on that. Yes, you are correct it would be every bar but a Doji. It was just an example of how you would check for a condition.

          Basically, you would have to just add another variable to see if what the previous bar was. Here is a quick indicator that I made that will do something like this that you may try.

          It should be able to do what you would like or can be easily modified for any minor changes.

          Let me know how it works for you.
          Attached Files
          JCNinjaTrader Customer Service

          Comment


            #6
            Works perfectly. Thank-You!

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            566 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            330 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
            547 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            548 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X