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

    Please attach your complete script file so we can take a look at it instead of code snippets. Thanks.
    Josh P.NinjaTrader Customer Service

    Comment


      Hi Josh

      As I am not prepared to share the code in a public forum, may I email it to your attention via support at ninjatrader dot com please?

      Comment


        Sure. Please send it to support [at] ninjatrader [dot] com with Attn: Josh in the subject line and a link to this forum thread. Thanks.
        Josh P.NinjaTrader Customer Service

        Comment


          Just emailed it over with Attn Josh on the subject line. Big Big Big Big Big Big Thank You for your prompt yes.

          Comment


            Good afternoon

            Believe you have had a Nice Long weekend.

            I created an indicator that will trigger a visual alert (text label on top left corner) when a few moving average conditions are met.

            http://screencast.com/t/Eo9QfnFZCv

            How can I modify the indicator so that it will display the same visual alert on a lower time frame chart? Currently I have the indicator on a 9-Range chart and would like to have the text displayed on a 5-Range chart when the 9-Range conditions are met. Appreciate your guidance. Thank you.

            Comment


              You have to work with a multi time frame indicator or strategy. There is a sample available, mentioned a few times in this thread, and documentation is available here:


              This is the only framework we have for calculating scripts on a different series than it's applied to.
              Ryan M.NinjaTrader Customer Service

              Comment


                Thanks Ryan for your prompt response. I do not have much luck with the MTF sample/help guide so far .. sigh .. Hoping there maybe another route to get my indicator working. Will do more trouble-shooting.

                Comment


                  Good morning Ryan

                  You will be glad to learn that I succeeded in creating a workable MTF strategy per enclosed. The text alerts on 5R (lower time frame) have been matching the 9R ones (higher time frame) .. haha ..

                  Unfortunately, I don't have the same luck with its indicator counterpart, ie my MTF indicator with the same conditions/structure has been plotting nothing. Appreciate your suggestion on how to fix the same please. Thank you.
                  Attached Files

                  Comment


                    Thanks for the files. I ran them both and saw similar. The indicator gave an error for "index out of range". The difference here is due to the strategies built in Min bars required handling but this needs to be handled in code with an indicator.

                    Try using the following here to allow for enough bars on all series.
                    if (CurrentBars[0]< BarsRequired ||CurrentBars[1]< BarsRequired ||CurrentBars[2]< BarsRequired)
                    return;


                    Ryan M.NinjaTrader Customer Service

                    Comment


                      Good morning Ryan

                      Big Big Thank You for your prompt advice/suggestion! I made the suggested changes and my MTF indicator is plotting now .. hooray!

                      I will market replay it for some days. If it performs "normal", I will share it in the Download section. It took me almost a month to create a workable MTF indicator. I am hoping it may give others an idea on how to create a simple one. Yes, I believe experienced/talented programming professionals can create it within minutes.

                      My trillion thanks again Ryan! You have made my day/weekend .. smile ..

                      Comment


                        Glad you are making progress on it. Thanks for following up here.
                        Ryan M.NinjaTrader Customer Service

                        Comment


                          Hi Ryan

                          You may be glad to learn that I shared my simple multi-time frame indicator in the Download area last week. Will continue enhancing it so that I may one day get it working the way I want.

                          I'd like to pick your brains again please. Is it possible to specify CalculateOnBarClose @False and @True for 2 different time frames within the same MTF indicator? Appreciate your tips. Thank you.

                          Comment


                            Thanks for sharing your multiseries script, belecona. It is possible to combine COBC = false with COBC = true logic within the same script. This sample can help with the required technique:

                            Ryan M.NinjaTrader Customer Service

                            Comment


                              Thanks Ryan for the sample. You've made my afternoon/week again. Let's see if I can figure it out lol.

                              Comment


                                Hi Ryan

                                With the COBC sample, I succeeded in compiling my revised MTF indicator successfully (per enclosed). Thank you. I would appreciate your advice on the following please:

                                1. Line 49

                                I replaced the former code (Lines 46-47 to make sure we have enough bars) with (Historical) so that we can run in real-time. Right?

                                2. I market replayed the revised script and it did continue printing the higher time frame text label + plotting aqua/orange diamonds based on the lower time frame conditions. Unfortunately, the diamonds have been replacing by the current ones. How can I have the valid historical diamonds stay on the chart?

                                Please enlighten me. Thank you.
                                Attached Files

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                                0 responses
                                649 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
                                576 views
                                1 like
                                Last Post RFrosty
                                by RFrosty
                                 
                                Working...
                                X