Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Net Change since Last Week's Close

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

    Net Change since Last Week's Close

    Hi,

    I'm trying to get the Net change since Last week's close.

    Isn't that:

    (Close[0] - Close[0].DayOfWeek.Friday);

    ???

    #2
    Hello stockgoblin,
    If you are trying to calcualate the differene on Intraday bars then you may consider using this code to calculate the Weekly OHLC.
    http://ninjatrader.com/support/forum...tid=-1&lpage=1

    A sample code to calculate the difference will be like:
    Code:
    double diff = PriorWeekOHLC().PriorWeekClose[0] - Close[0];
    JoydeepNinjaTrader Customer Service

    Comment


      #3
      Hey, Thanks for pointing me in the direction of your indicator. I'm looking for the Prior Week's Close to put on the Market Analyzer. I tried your indicator but it just gives me the prior days close in the Market Analyzer. Did you expand that code for use in the Market Analyzer?

      Can I do a simple modification to make it give me the Prior Week's Close in the Market Analyzer?

      Comment


        #4
        Hello stockgoblin,
        To assists you further can I know what parameters you have used while assigning the Indicator in the Market Analyzer.

        Can you please upload a screenshot of the indicator parameters box.

        To send a screenshot press Alt + PRINT SCREEN to take a screen shot of the selected window. Then go to Start--> Accessories--> Paint, and press CTRL + V to paste the image. Lastly, save as a jpeg file and send the file as an attachment.

        For detailed instructions please visit the following link
        JoydeepNinjaTrader Customer Service

        Comment


          #5
          I tried using daily data and that's when you get the previous day's close. Using weekly data in the market analyzer settings gives numbers that I can't verify where they come from.
          Attached Files

          Comment


            #6
            Hello stockgoblin,
            Thanks for the clarification.

            The PriorWeekOHLC indicator works on Intraday Data only.

            To view the prior weeks closing price on the Market Analyzer you can simply use a 1 (one) period SMA applied on weekly data with Calculate on bar close set to true. Please refer to the attached screenshot which further demonstrates the scenario.
            Attached Files
            JoydeepNinjaTrader Customer Service

            Comment


              #7
              Now, that's smart thinking.

              Can I press your brain further though? Now that I have the Prior Week's close, I would like the net change from the prior week's close on the Market Analyzer.

              so:

              Can we do that in a formula using SMA and I'll whip up a market analyzer indicator?

              Comment


                #8
                Hello stockgoblin,
                The prior week indicator works on intraday data only.

                A much easier way would be simply calculate a net change indicator and apply it on a weekly bar.
                JoydeepNinjaTrader Customer Service

                Comment


                  #9
                  Yea, that sounds good. I'll get on it. There is a Net Change Market Analyzer indicator but it's hard coded for the last daily close, not the last weekly close.

                  Comment


                    #10
                    Hello stockgoblin,
                    The NetChange is a MarketAnalyzer column and not an indicator.

                    You have to build an custom indicator to calculate the net change and then apply the indicator on a weekly bar with Calculate on bar close set to false.
                    JoydeepNinjaTrader Customer Service

                    Comment


                      #11
                      Done! Thanks for all your help.
                      Attached Files

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by pserrera, Today, 04:29 PM
                      0 responses
                      2 views
                      0 likes
                      Last Post pserrera  
                      Started by dsfhbrejej, Today, 03:54 PM
                      0 responses
                      5 views
                      0 likes
                      Last Post dsfhbrejej  
                      Started by briteusa, Today, 03:53 PM
                      0 responses
                      4 views
                      0 likes
                      Last Post briteusa  
                      Started by kathreynuliex, Today, 03:00 PM
                      0 responses
                      3 views
                      0 likes
                      Last Post kathreynuliex  
                      Started by sdauteuil, Today, 01:03 PM
                      1 response
                      17 views
                      0 likes
                      Last Post sdauteuil  
                      Working...
                      X