Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Where to start if I want to create a strategy on a trading set-up?

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

    Originally posted by belecona View Post
    Please suggest a way to stop the email alerts if there's a way. They're over-flooding my mailbox lol .. oh well ..
    You need to use a boolean flag to tell the script to send email only when a trade is triggered.

    Comment


      Great addition, Koganam. Once you solve the immediate problem of your script sending emails, should consider adding some control there to only submit once.
      Ryan M.NinjaTrader Customer Service

      Comment


        Hi Ryan and Koganam

        I stopped running the script for an hour now. Continue getting hundreds of email alerts every 5-10 minutes. Guess it may take the system some hours to dry up the alerts ...

        Too scary to add a SendMail alert when I don't know how to program it properly. I will do more research on boolean flag after overcoming the alert dilemma. Thank you.

        Comment


          Originally posted by belecona View Post
          Hi Ryan and Koganam

          I stopped running the script for an hour now. Continue getting hundreds of email alerts every 5-10 minutes. Guess it may take the system some hours to dry up the alerts ...

          Too scary to add a SendMail alert when I don't know how to program it properly. I will do more research on boolean flag after overcoming the alert dilemma. Thank you.
          I just hope that you did not have COBC = false in that script, or you may have well sent in excess of 1 million emails.

          Comment


            OK, should stop eventually if the script is no longer running. Make sure there are no hidden workspaces loaded using File > Workspace, or that it it is not applied to a market analyzer column.
            Ryan M.NinjaTrader Customer Service

            Comment


              Yes, the indicator with COBC@false ooooooooooooooooooooo

              Comment


                Is this Strategy will be shared to public??

                Comment


                  Sorry it's not a strategy. It's a signal indicator that I experimented with a SendMail alert. With the looping code, it generated 500,000+ mail alerts and finally stopped after 4 hours - gosh!

                  Since it's a nice-to-have feature, I am not going to play with the indicator anymore. Do not have a big heart to accommodate another half a million or millions of alerts ..

                  Comment


                    Originally posted by belecona View Post
                    Sorry it's not a strategy. It's a signal indicator that I experimented with a SendMail alert. With the looping code, it generated 500,000+ mail alerts and finally stopped after 4 hours - gosh!

                    Since it's a nice-to-have feature, I am not going to play with the indicator anymore. Do not have a big heart to accommodate another half a million or millions of alerts ..
                    The safe way to code anything that will generate output other than to the chart screen, is to replace the generating function with another that Print()s to the Output window or throws an alert. That way, if something goes wrong, the worst that can happen is that your local computer get overwhelmed.

                    Once you have that working correctly then you replace your output generator, whatever it may be, with the SendMail function, which will then behave exactly as your safe test function did, in terms of how much output it will generate.

                    Comment


                      Hi Koganam

                      Thanks for your tips.

                      I really don't know what happened. My Up/Down Arrows and audio alerts using the same conditions have been working fine for weeks. Yet when I just added the SendMail code right beneath one of them, it's getting wild. Let me calm down a little (getting over the unexpected chaos last week) and may give it a second look

                      Comment


                        Originally posted by belecona View Post
                        Hi Koganam

                        Thanks for your tips.

                        I really don't know what happened. My Up/Down Arrows and audio alerts using the same conditions have been working fine for weeks. Yet when I just added the SendMail code right beneath one of them, it's getting wild. Let me calm down a little (getting over the unexpected chaos last week) and may give it a second look
                        If a draw object draws over itself, you will not notice that difference.
                        Alert() has a bulit-in reset that ensures that it does not fire on every tick, but only after the reset time. Have a reset longer than the candle time, and in effect, you have an Alert() that can trigger only once, so everything looks and sounds fine, hiding the fact that because COBC = false, you may be generating many things, that just visually and audibly do not force notice.

                        You have to make a programmatic arrangement to ensure that the email is sent only once per occurrence.

                        Comment


                          Hi Ryan

                          Believe your day has been going well. I need to do testing on some breakout systems. Since I have not created any indicators/strategies based on Minute charts, I would appreciate your kind assistance in directing me to find some NinjaTrader samples that may cover the following:

                          1. Identify High/Low of a specified timeline. For example, draw 2 horizontal lines on the chart to highlight the High/Low for 9:30-9:45 am EST.

                          2. Instead of changing the Start/End time within the indicator's script, how can I have them on the indicator's parameters so that I can change them easily? If it's too complicated, I'm happy to accomplish Item 1 above and manually change the time.

                          3. Once I have the High/Low (per Item 1), how can I reference them for a pair of Buy/Sell orders waiting to be filled when price breaks High/Low in a strategy?

                          Thank you for your guidance. Have a nice afternoon.

                          Beth

                          Comment


                            Hello,

                            Originally posted by belecona View Post
                            Hi Ryan
                            1. Identify High/Low of a specified timeline. For example, draw 2 horizontal lines on the chart to highlight the High/Low for 9:30-9:45 am EST.
                            While I'm not familiar with any ready made indicators you could take a look at the "CurrentDayOHL" indicator that comes with Ninja trader and apply a time filter to a custom version of it.


                            2. Instead of changing the Start/End time within the indicator's script, how can I have them on the indicator's parameters so that I can change them easily? If it's too complicated, I'm happy to accomplish Item 1 above and manually change the time.
                            Along with the above you could use a time filter in the script and then define a user input so that you can change the times used.

                            You would put something like the following in the properties section of the script to add a user input:
                            Code:
                                    [Description("Starting time")]
                                    [GridCategory("Parameters")]
                                    public int MyStartTime
                                    {
                                        get { return myStartTime; }
                                        set { myStartTime= Math.Max(1, value); }
                                    }
                            http://www.ninjatrader.com/support/h...ries_class.htm

                            3. Once I have the High/Low (per Item 1), how can I reference them for a pair of Buy/Sell orders waiting to be filled when price breaks High/Low in a strategy?
                            Similarly to how you would use CurrentDayOHL() except with your custom indicator's name (see this link for examples)


                            Please let me know if I can be of further assistance.
                            LanceNinjaTrader Customer Service

                            Comment


                              Thanks Lance for your prompt response. I will go through the suggested samples. Will you kindly provide me with the updated link where I can find NinjaTrader sample indicators/strategies? Thank you.

                              Have a nice afternoon.

                              Beth

                              Comment


                                Hello,

                                Yes, you can find reference samples here: http://www.ninjatrader.com/support/f...ead.php?t=3220

                                You can find Tips here: http://www.ninjatrader.com/support/f...ead.php?t=3229

                                You can find file sharing here: http://www.ninjatrader.com/support/f...splay.php?f=37

                                Please let me know if I can be of further assistance.
                                LanceNinjaTrader Customer Service

                                Comment

                                Latest Posts

                                Collapse

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