Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Multi instrument

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

    #16
    Hello alexstox,

    Thank you for your response.
    Originally posted by alexstox View Post
    You can see this in Output, that I attached earlier.
    Correct, but how did you get the daily prints? The code you provided me only provides the weekly bars.

    Comment


      #17
      Originally posted by NinjaTrader_PatrickH View Post
      Hello alexstox,

      Thank you for your response.

      Correct, but how did you get the daily prints? The code you provided me only provides the weekly bars.
      well, I use this indicator in strategy script, where main series is Daily. Print() is in both indicator and strategy. Thats why there are rows from both in Output. Rows with "INDICATOR" word is from indicator script.

      Comment


        #18
        Hello alexstox,

        Thank you for your response.

        Are you applying the CloseWeekPer to a Daily chart as well? The strategy you provided does not print nor does it add the CloseWeekPer with a Daily interval.

        Comment


          #19
          Originally posted by NinjaTrader_PatrickH View Post
          Hello alexstox,

          Thank you for your response.

          Are you applying the CloseWeekPer to a Daily chart as well? The strategy you provided does not print nor does it add the CloseWeekPer with a Daily interval.
          Patrick, CloseWeekPer is indicator. I add it in strategy, where main instrument series is Daily.

          Comment


            #20
            Hello alexstox,

            Thank you for your response.

            The strategy named 'ATR' that you provided does not add the ClosePerWeek to it's code nor does it add anything that would print the Daily close information as you have designed.

            Comment


              #21
              Originally posted by NinjaTrader_PatrickH View Post
              Hello alexstox,

              Thank you for your response.

              The strategy named 'ATR' that you provided does not add the ClosePerWeek to it's code nor does it add anything that would print the Daily close information as you have designed.
              I didn't sent you strategy, I only sent indicator =)))

              Comment


                #22
                Hello alexstox,

                Thank you for clarifying.

                Can you send a test sample so I may investigate this matter further?

                Comment


                  #23
                  Originally posted by NinjaTrader_PatrickH View Post
                  Hello alexstox,
                  Thank you for clarifying.
                  Can you send a test sample so I may investigate this matter further?
                  Hello Patrick, so what you can tell me? I've sent you strategy earlier.

                  Comment


                    #24
                    Hello alexstox,

                    Thank you for your follow up.

                    I am still looking into this matter on my end with your strategy.

                    Comment


                      #25
                      Hello alexstox,

                      Thank you for your patience.

                      You have two input series, a Week and a Day series. The Day bars are not going to have the same value from the ClosePerWeek() indicator as the Week bars on the close of the of the week bar, as the Day bar is only looking at that day where the Week bar encompasses the entire week of data.

                      For example, compare the Open, High, Low, and Close of the Day bar on the closing day of the Week bar and you will see the Open, High, Low, Close is not the same as the Week bar.

                      Comment


                        #26
                        Originally posted by NinjaTrader_PatrickH View Post
                        Hello alexstox,

                        Thank you for your patience.

                        You have two input series, a Week and a Day series. The Day bars are not going to have the same value from the ClosePerWeek() indicator as the Week bars on the close of the of the week bar, as the Day bar is only looking at that day where the Week bar encompasses the entire week of data.

                        For example, compare the Open, High, Low, and Close of the Day bar on the closing day of the Week bar and you will see the Open, High, Low, Close is not the same as the Week bar.
                        Patrick, please, advise me what to do.

                        Maybe I should add
                        if (BarsInProgress==2) //start BarsInProgress for weekly instrument only
                        {and here is everything with CloseWeekIndictor...
                        }
                        Last edited by alexstox; 07-22-2014, 11:53 PM.

                        Comment


                          #27
                          Hello alexstox,

                          Thank you for your response.

                          Well, your indicator works great on it's own using the week bar as it's input. So if this is the only value you need, then don't use the Daily bar as an input for the indicator.

                          Comment


                            #28
                            Originally posted by NinjaTrader_PatrickH View Post
                            Hello alexstox,
                            Thank you for your response.
                            Well, your indicator works great on it's own using the week bar as it's input. So if this is the only value you need, then don't use the Daily bar as an input for the indicator.
                            Patrick, but I don't use Daily as input. As you see in indicator script
                            Add(MyInstrum1, PeriodType.Week, 1);
                            Than in strategy I only use string symbol as input for indicator. Main instrument data (not for indicator) still in Daily bars. Please comment.

                            Comment


                              #29
                              Hello alexstox,

                              Thank you for your response.
                              Originally posted by alexstox View Post
                              Patrick, CloseWeekPer is indicator. I add it in strategy, where main instrument series is Daily.
                              This would then be used as the PeriodType for Add(CloseWeekPer(MyInstrum1));

                              Comment


                                #30
                                Originally posted by NinjaTrader_PatrickH View Post
                                Hello alexstox,
                                Thank you for your response.
                                This would then be used as the PeriodType for Add(CloseWeekPer(MyInstrum1));
                                Please clarify. There are Major instrument, MyInstrum1 and MyInstrum2 in strategy ([0], [1], [2] respectively).

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by CortexZenUSA, Today, 12:53 AM
                                0 responses
                                1 view
                                0 likes
                                Last Post CortexZenUSA  
                                Started by CortexZenUSA, Today, 12:46 AM
                                0 responses
                                1 view
                                0 likes
                                Last Post CortexZenUSA  
                                Started by usazencortex, Today, 12:43 AM
                                0 responses
                                5 views
                                0 likes
                                Last Post usazencortex  
                                Started by sidlercom80, 10-28-2023, 08:49 AM
                                168 responses
                                2,266 views
                                0 likes
                                Last Post sidlercom80  
                                Started by Barry Milan, Yesterday, 10:35 PM
                                3 responses
                                13 views
                                0 likes
                                Last Post NinjaTrader_Manfred  
                                Working...
                                X