Announcement

Collapse
No announcement yet.

INV Question

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

  • INV Question

    On a 5-minute advance-decline chart ($ADD) I want to place a line showing the HLC/3 of the 25-minute period of $ADD.

    The below code appears to be ignoring the "inv(25)" parameter.
    Whats being plotted is a line connecting the closing price of each 5-minute bar, not the 25-minute interval.
    Any idea of what I can change?

    function preMain() {
    setPriceStudy(true);
    setComputeOnClose(true);
    }
    function main() {
    var V1 = sma(1, "hlc3()", inv(25));
    return V1;
    }

    Yuri
    Attached Files
    Good Trading,
    Yuri Shramenko

  • #2
    Yuri
    The correct syntax is sma(1, hlc3(inv(25))
    Unless you have a specific reason for using a moving average you could also just use hlc3(inv(25))
    Alex

    Comment

    Working...
    X