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

MASlopeBoxMulti indicator quetion

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

    MASlopeBoxMulti indicator quetion

    I found this indicator in this forum.
    I import it to NT 7. Initially I see a box with a degree, indicating a slope of a moving average. When I scroll the screen, the degree does not adjust itself. Sometimes the box or slope simply disappears. Not sure if there is some kind of setup that I need.

    Any help or suggestion is appreciated.
    Attached Files

    #2
    Benluk, we would unfortunately not be intimately familiar with this custom indicator and how it was designed to work, best would be sending the original developer a PM or Email to ask.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      MASlopeBoxMulti indicator

      I have a technical question on display the result. This indicator displays an angle of a moving average inside a rectangle box on the lower right corner of the screen. If I applies this indicator on 2 different moving averages, the angles are stacking up vertically.

      I would like to make changes and display the angles horizontally.

      I believe the coding is as shown below.

      //the bounds offset is multipled by the box number to properly position new instances of the SlopeBox

      graphics.DrawRectangle(new Pen(Plots[0].Pen.Color, 2), bounds.X + bounds.Width - 60, bounds.Y + bounds.Height - Boxnumber * 40, 46, 22);

      graphics.DrawString(strDegrees.ToString(), textFont, textBrush, bounds.X + bounds.Width - 60, bounds.Y + bounds.Height - Boxnumber * 40, stringFormat);
      //graphics.DrawString(MySlopeType.ToString(), textFont, textBrush, bounds.X + bounds.Width - 31, bounds.Y + bounds.Height - 40, stringFormat);


      I look up NT manual for DrawRectangle and found it is different.


      Please advise what I should change or direct me to the right resources about DrawRectangle?

      Thank you.

      Comment


        #4
        Hello Benluk,

        Thank you for your post.

        You would want to refer to the following link: http://www.ninjatrader.com/support/h...wrectangle.htm

        Comment


          #5
          Sorry I posted the wrong link.

          I was referring to the same link as what you referred. The syntax is just different from the code. That is why I could not figure out how to change.

          Comment


            #6
            Hello Benluk,

            Thank you for your response.

            My mistake, this would be the C# method to draw a rectangle: http://msdn.microsoft.com/en-us/libr...v=vs.110).aspx

            Comment


              #7
              Thank you for the information.
              Although I do not understand this language well, by guessing what those parameters mean, it allows me to make the changes at my liking.

              Comment


                #8
                When I use this indicator, I like using WDS and apply to 1-min chart of 144-tick chart.

                The angle values appear to be reasonably correct, ranging from 0 to 60+ (same as negative). Sixty degree is considered unusually large value, never see eighty degrees.

                But when I apply it to a daily chart, the angle values look unreasonable. Do not see zero or single digit, and it skips many values and jumps to more than 80 degrees and stay there. I never see a moving average sloping that steep.

                The logic does not seem to be related to time frame. I expect that the calculation should also work on daily chart.

                Did I do something wrong? Any idea why it happens or how to fix?

                Comment


                  #9
                  Hello Benluk,

                  Thank you for your response.

                  Are you adding another bar series to your code?

                  Can you provide screenshots of the charts to compare?

                  Comment


                    #10
                    I attach 1-min chart and a daily chart. Both charts have 2 moving averages.
                    1-min chart has reported 38 and 22 degrees, look reasonable.
                    Daily chart has reported 84 and -86 degrees. The red line is just turning, expected to be a small number ranging from 0 to 10.

                    I could not figure it out why it behaves differently in daily chart.

                    You can find the zip file in this email chain and easily re-create the same scenarios. You can use other moving averages.
                    Attached Files

                    Comment


                      #11
                      Forgot to answer your question...I do not know this language well, and I do not know 'bar series.' I did not change coding except changing the multiple angle boxes piling up vertically to laying horizontally.

                      This happened before I made those changes recently. I have been using it for more than a year. It has been like that all the times and I did not say anything. Now I think it won't hurt by just asking to see if someone knows why.

                      Comment


                        #12
                        Hello Benluk,

                        Thank you for your response.

                        I may not fully understand what you are inquiring here. Are you simply stating the plots are different from a 1 Minute to a Daily chart?

                        Comment


                          #13
                          Install this indicator and try HMA on your chart, using WTS or WDS calculations.
                          First apply it to 1-min chart. Go forward or backward to see how the degree is changing.
                          Second apply it to a daily chart. Go forward or backward to see how the degree is changing.

                          The slope (degree) looks reasonably correct on 1-min chart.
                          The slope (degree) looks unreasonable on a daily chart.

                          The coding is not time frame related. I could not figure out why.

                          Comment


                            #14
                            Hello Benluk,

                            Thank you for your response.

                            I am seeing different slopes as the bars are different from the 1 Day to the 1 Minute chart. Can you provide an example of what you are expecting to see on the Daily chart?

                            Comment


                              #15
                              Okay one more time and is the last time. I attach several pictures using the following:

                              Product: YM 12-2014
                              Indicator: MASlopeBoxMulti
                              Moving average: HMA (14)
                              Slope type: WDS

                              1) 1-min chart. On 10/31/2014 15:15 p.m. CST, the angle was -29 degrees. Looks reasonably correct. See YM-10-31-2014 15-15 1-min chart.

                              2) Keep all the setting. Change the chart to daily chart.
                              2a) On 10/31/2014, the angle was 89 degrees. It does not look correct to me. Does it look like a perpendicular line? See YM-10-31-2014 Daily chart.

                              2b) Move the chart backward day by day to 10/20/2014. The angle stays at 89 degrees without changes. Again it does not look correct. See YM-10-20-2014 Daily chart.

                              In contrast, on 1-min chart, when you move the chart forward or backward, you will see the angle changes for each minute. This is what I expect to see on a daily chart.

                              2c) Move the chart backward to 10/18/2014. The angle became -88 degrees. See YM-10-18-2014 Daily chart. It does not look correct and it skips smaller changes.

                              In contrast, on 1-min chart, when the moving average turns and changes direction, it usually has small angle ranging from 0 to 15 degrees or 0 to -15 degrees. You can easily verify from your minute chart. This is what I expect to see on a daily chart.

                              Questions

                              The logic of calculations are the same on daily chart and minute chart, I do not understand why both behave differently. Did I do something wrong?

                              Do you get the same results as I do? If your chart looks correct to you, could you show your pictures to convince me?

                              If you still do not understand my question, then discard this post.
                              Attached Files

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Skifree, Today, 03:41 AM
                              1 response
                              2 views
                              0 likes
                              Last Post Skifree
                              by Skifree
                               
                              Started by usazencort, Today, 01:16 AM
                              0 responses
                              1 view
                              0 likes
                              Last Post usazencort  
                              Started by kaywai, 09-01-2023, 08:44 PM
                              5 responses
                              603 views
                              0 likes
                              Last Post NinjaTrader_Jason  
                              Started by xiinteractive, 04-09-2024, 08:08 AM
                              6 responses
                              23 views
                              0 likes
                              Last Post xiinteractive  
                              Started by Pattontje, Yesterday, 02:10 PM
                              2 responses
                              23 views
                              0 likes
                              Last Post Pattontje  
                              Working...
                              X