Announcement

Collapse
No announcement yet.

MACD return plot as solid HORIZONTAL line - not histogram

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

  • MACD return plot as solid HORIZONTAL line - not histogram

    Greetings, thanks for looking at this.
    I am on v11 but the attached efs was created in Formula Wizard.

    First: In MACD when data is returned/plotted in the non-price pane, I want the display to be a horizontal line. I used Histogram in the attached efs to figure out the coloring when data is above or below the ZERO line.

    The data returned/plotted should be a solid horizontal line. Below is ideal looking display. The Blue is when data is above ZERO line; Red is when data is below ZERO line.

    Second: I do want to use multiple time frames in the chart window (as additional non-price panes). But I was unable to get the "customMACD" recognized in the Formula Wizard, so I do not know how to code for the other time frames.

    Click image for larger version

Name:	solidline.jpg
Views:	1
Size:	2.3 KB
ID:	246918
    Attached Files

  • #2
    VSAtrader
    With regards to plotting the MACD histogram as a horizontal line the following two screenshots illustrate how you can do it in the Formula Wizard.





    Essentially in the Study Configuration you select Line as the plot type and set it to the desired thickness (note that I also added to restrict the study between 0 and 2 so as to center the returned line as you can see in the screenshot enclosed below)
    Then in the Formula Configuration window you set a constant value as the Returned Data Point (in the case of this example I used 1 so as to center it relative to the min and max I mentioned earlier)
    The result is as follows



    As to being able to calculate the study on multiple intervals that is not possible using the Formula Wizard alone as this uses only the legacy efs functions which do not have this capability [other than for a few functions and even with those the results are questionable as the values returned are not properly referenced by date and time as with the efs2 functions but by bar index]
    To accomplish what you want you need to write your script using the EFS Editor and the efs2 functions. There are many examples available in the forum on how to calculate studies on external intervals as this topic has been covered at length before
    If you are unfamiliar with programming in efs then it may benefit you to learn to do so especially if you plan on using formulas.
    To do this I would suggest that you review the JavaScript for EFS video series and the Core JavaScript Reference Guide. Those will provide you with a thorough introduction to programming in JavaScript which is at the foundation of EFS. Once you have done that go through the EFS KnowledgeBase and study the Help Guides and Tutorials which will provide you with the specifics of EFS.
    If instead you just want someone to write the study for you then you should post your request in the New Study Suggestions forum. As an aside search the forum as this type of study [or at the very least a similar one] has already been done
    Alex


    Originally posted by VSAtrader View Post
    Greetings, thanks for looking at this.
    I am on v11 but the attached efs was created in Formula Wizard.

    First: In MACD when data is returned/plotted in the non-price pane, I want the display to be a horizontal line. I used Histogram in the attached efs to figure out the coloring when data is above or below the ZERO line.

    The data returned/plotted should be a solid horizontal line. Below is ideal looking display. The Blue is when data is above ZERO line; Red is when data is below ZERO line.

    Second: I do want to use multiple time frames in the chart window (as additional non-price panes). But I was unable to get the "customMACD" recognized in the Formula Wizard, so I do not know how to code for the other time frames.

    [ATTACH=CONFIG]16528[/ATTACH]

    Comment


    • #3
      Thanks much for the speedy and detailed reply Alexis!

      Originally posted by Alexis C. Montenegro View Post
      VSAtrader
      ...(note that I also added to restrict the study between 0 and 2 so as to center the returned line as you can see in the screenshot enclosed below)
      I did try changing the restrict also, but without the "constant value" below mentioned, it did not appear effective. The vertical lines stretched entirely from top to bottom.

      Visually...I would prefer to only see "0.00" at what is actually the ZERO line, but this will do for now!


      Then in the Formula Configuration window you set a constant value as the Returned Data Point (in the case of this example I used 1 so as to center it relative to the min and max I mentioned earlier)
      Ah, so it's the constant value that gets rid of the vertical lines of the Histogram. This really makes a difference!


      If you are unfamiliar with programming in efs then it may benefit you to learn to do so especially if you plan on using formulas.
      Thanks for the learning path to take!

      Comment


      • #4
        VSAtrader
        You are welcome

        I did try changing the restrict also, but without the "constant value" below mentioned, it did not appear effective. The vertical lines stretched entirely from top to bottom.
        That is because even though you restrict a study [in your case the MACD histogram] to a specific minimum and/or maximum you are not actually limiting the values returned by that study but only its “display window”.
        Alex


        Originally posted by VSAtrader View Post
        Thanks much for the speedy and detailed reply Alexis!


        I did try changing the restrict also, but without the "constant value" below mentioned, it did not appear effective. The vertical lines stretched entirely from top to bottom.

        Visually...I would prefer to only see "0.00" at what is actually the ZERO line, but this will do for now!


        Ah, so it's the constant value that gets rid of the vertical lines of the Histogram. This really makes a difference!


        Thanks for the learning path to take!

        Comment

        Working...
        X