+ Reply to Thread
Results 1 to 7 of 7

Formulas for calculating for two sma lines crossing point value

  1. #1
    Forum Contributor
    Join Date
    09-22-2012
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    184

    Formulas for calculating for two sma lines crossing point value

    Hi,

    Been doing this for awhile now. Search online doesn't help. Need to find formula for the following.


    1) Formula to calculate minimum value (highlighted orange cell) for the crossing

    2) Formula to calculate the value of the crossing (circled red in chart)

    Please refer to the attachment for the data and chart.

    Currently I use the average between point and the value is not very accurate.

    Hope someone is good at this.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    05-20-2013
    Location
    Ohio, USA
    MS-Off Ver
    Excel 2013
    Posts
    941

    Re: Formulas for calculating for two sma lines crossing point value

    This should get you a lot closer on #2.

    Let's see how this goes before we get into #1.
    Attached Files Attached Files

  3. #3
    Forum Contributor
    Join Date
    09-22-2012
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    184

    Re: Formulas for calculating for two sma lines crossing point value

    All function in column F is new to me. Need time to digest it.

    Just to confirm. In column G, the formula is to detect the crossing of the sma?
    Last edited by DavidRoger; 06-27-2015 at 02:41 AM.

  4. #4
    Forum Contributor
    Join Date
    09-22-2012
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    184

    Re: Formulas for calculating for two sma lines crossing point value

    Hi jhren,

    I think I just solved formula #2. If it wasn't for the function in your formula,
    I couldn't have found Linest. I don't know how to explain it but it just works.
    Book_2.xls

    Have you got any idea for formula #1?

  5. #5
    Valued Forum Contributor
    Join Date
    05-20-2013
    Location
    Ohio, USA
    MS-Off Ver
    Excel 2013
    Posts
    941

    Re: Formulas for calculating for two sma lines crossing point value

    Your calculation using LINEST is inaccurate. Increase the resolution of the chart at the intersection, i.e. set vertical axis to a range of 2 (e.g. 2190 to 2192 for the first) and add minor gridlines of .1 and you will see.

  6. #6
    Valued Forum Contributor
    Join Date
    05-20-2013
    Location
    Ohio, USA
    MS-Off Ver
    Excel 2013
    Posts
    941

    Re: Formulas for calculating for two sma lines crossing point value

    Here's a simpler method using basic graphing math based on two y=ax+b formulas—one for sma1 subset, another for sma2 subset—where the intersection must satisfy both equations. You won't see anything representing "x" in the column F formulas because the "x" subset is always {0,1} for your dataset... but the result values represent the "x" intersection value relative to that subset... which is why column E values being displayed are based on the column F value being 0 to 1.
    Attached Files Attached Files
    Last edited by jhren; 06-27-2015 at 03:20 PM.

  7. #7
    Forum Contributor
    Join Date
    09-22-2012
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    184

    Re: Formulas for calculating for two sma lines crossing point value

    I've checked it by plotting a vertical line across the chart. It's like you said. Now I know why my third cross has two figure instead of one. This one is a lot better. Thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. add lines with changing formulas depending on lines in another worksheet
    By fragger224 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-27-2015, 05:15 AM
  2. Help making scatter with stright lines end point at X before line end
    By Perdurable in forum Excel Charting & Pivots
    Replies: 8
    Last Post: 09-20-2013, 11:40 AM
  3. Replies: 0
    Last Post: 08-26-2012, 09:35 PM
  4. [SOLVED] Inserting Lines or Copying lines with formulas but without data
    By wnfisba in forum Excel General
    Replies: 2
    Last Post: 08-18-2006, 11:41 AM
  5. [SOLVED] Finding the value for the point two lines cross
    By Brian in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 03-02-2006, 08:10 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1