Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Random Alerts

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

    Random Alerts

    Hello,


    I'm new to the Ninjascript editor and just trying it out.

    I hope you can help me. I try to recognize a candlestick pattern with the program and give me a signal back.
    Unfortunately, the problem with this is that it also gives me signals even though the conditions are not met at all.
    The Indicator should just test the newest 3 Bars and ignore the others.

    I hope you can help me.

    Thanks.
    Last edited by Vracupie; 07-06-2021, 12:46 PM.

    #2
    Hello Vracupie,

    From the image I couldn't really tell what the problem is in contrast to the description. Have you tried using some Prints to output what values you are using in the condition? If the condition is true that would indicate the values matched what you are checking for, if that is not correct you may need to adjust what you are checking for.



    I look forward to being of further assistance.


    I look forward to being of further assistance.

    Comment


      #3
      Thank you for your fast answer. I fixed the random alerts and switched my programm to an Strategy, but the Programm stopps if it get one Signal. How can i Write that the Programm will Check the if‘s everytime there is a new bar (and gives everytime the signal not only once)? Thank you guys.

      Comment


        #4
        Hello Vracupie,

        Thank you for your reply.

        Jesse is out of the office today, but I'm glad to help - could you provide a sample of your current code? If we can see what you're trying, we can give you some guidance.

        Thanks in advance; I look forward to assisting you further.

        Comment


          #5
          Hello,

          first of all thanks for your fast answer!

          I fixed that my Indicator gave me Random Alerts and switched to an strategy.

          I still have the Problem, that my Indicator just check all the if's till he found one Signal.
          But after he gave me one Alert the Programm stops and will check no more bars.

          I have one more Question, how can i decide, that the Indicator only check the last 3 Bars?

          Thank you a lot!

          Comment


            #6
            Hello Vracupie,

            Thank you for your reply.

            We would need a sample of your code that's triggering the alerts in order to discern why it may only be alerting once.

            What kind of condition are you wanting to just check the last 3 bars for? Crossover conditions (CrossAbove() and CrossBelow() have a lookback period, meaning they will check that number of bars to see whether a series crossed a particular price level or other series.




            The more detail you can provide about what you're currently trying and what the intended behavior is, the more accurate assistance we can provide.

            Thanks in advance; I look forward to assisting you further.

            Comment


              #7
              Thank you for your reply.

              I added my Script, i hope you can help me.

              The Programm works, but only once. If i get an alert the script stops working and i have to restart the script.

              Maybe the script should make a return after the alert is coming out.

              Thank you a lot!
              Attached Files

              Comment


                #8
                Hello Vracupie,

                Thank you for your reply.

                In my testing I'm getting multiple alerts as I let the script run, they just aren't very often. I've been running this since about 7 am Mountain time and I've gotten just 2 alerts. I also note you have a typo in the first alert's file path - you have a space between the A and L in "Alert1.wav".

                Thanks in advance; I look forward to assisting you further.

                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