Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Automatic Alert

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

    Automatic Alert

    Hello,i am looking for an automatic alert if three candles have an special formation with down/up High/low/Open/Close on candle close.

    But my programm isnt working right. so it doesnt shows all formations i wrote down in the script. and if the programm shows a signal, it stops but lovely it shoes all day long.

    I hope so much you can help me, this would be so great. (Sorry for my bad english)


    Attached Files

    #2
    Hello Vracupie,

    To understand why the condition is or is not evaluating as true, print the time of the bar and all values in the conditions.

    Below is a link to a forum post that demonstrates using prints to understand behavior.


    For example:

    if(Close[2] >= Open[2]){ //Long - short - long kerze
    if(Open[1] >= Close[1] && Close[2] >= Open[1] && High[1] > Close[2] && Close[2] > Close[1]){
    if(Close[0] >= Open[0] && Close[2] >= Open[0] && Close[2] >= Close[0] && High[0] > Close[2]){

    Print(string.Format("{0} | Close[2]: {1} >= Open[2]: {1} && Open[1]: {2} >= Close[1]: {3} && High[1]: {4} > Close[2]: {1} && Close[2]: {1} > Close[1]: {3} && Close[0]: {5} >= Open[0]: {6} && Close[2]: {1} >= Open[0]: {6} && Close[2]: {1} >= Close[0]: {5} && High[0]: {7} > Close[2]: {1}", Time[0], Close[2], Open[2], Open[1], Close[1], High[1], Close[0], Open[0], High[0]));

    What is the specific condition set that is not evaluating as true when you expect?
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Thank you very much! i will try it this way.

      Can you also say me how i set a soundfile on right place? This would be very helpfull for me.

      Thanks and best!
      ​​​​​​

      Comment


        #4
        So my main problem is: once the alert is triggerd, the programm stops. But i want this programm working all day long and to shows all signals of the day.

        how can i let start the loop every candle again?

        Comment


          #5
          Hello Vracupie,

          Below is an example of playing a sound file. I used the Strategy Builder to generate this line.
          PlaySound(@"C:\Program Files (x86)\NinjaTrader 8\sounds\Alert1.wav");

          When you mention: "the programm stops", do you mean the script is disabled with an error message on the Log tab of the Control Center?

          If not, the logic itself would control if those lines of code are evaluated. What is the output from the prints that show why the condition is true or false?
          Chelsea B.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          648 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          369 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          108 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          572 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          574 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X