Announcement

Collapse
No announcement yet.

Last Price & Horizontal Line Across Chart

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

  • Last Price & Horizontal Line Across Chart

    Hello,

    Does eSignal have functionality to draw a horizontal line across the chart at the level of the last price?
    This makes it easier to visually compare the current price with previous swing high/low or resistance/support etc, without expanding the chart window, especially when a chart is compressed to show a longer time of period.
    If not, can you consider including this functionality in a future release?

    Mori

  • #2
    Mori
    The enclosed formula should do what you asked.
    The color of the line is black by default but can be changed through Edit Studies
    Alex

    PHP Code:
    function preMain() {
        
    setPriceStudy(true);
        
    setStudyTitle("LastPrice");
        
    setShowCursorLabel(false); 
        
        var 
    fp1 = new FunctionParameter("Color"FunctionParameter.COLOR);
        
    fp1.setDefault(Color.black);

    }

    function 
    main(Color) {

    addBand(close(0),PS_SOLID,1,Color,"Last");

    return;

    Comment


    • #3
      Alex

      Many thanks for your help.
      I have successfully added the formula and it works fine.

      Mori

      Comment

      Working...
      X