Announcement

Collapse
No announcement yet.

pro activity

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

  • pro activity

    hi , i m asking your help to change the formula of this indicator below, in order to calculate the 14 days average of C - O ,
    BUT USING AS CLOSE THE VALUE OF YESTERDAY , WHILE FOR THE OPEN WE LL USE THE VALUE OF TODAY ( in this case on daily charts , but anyway the close of the previous bar CLOSE , and the current bar HIGHT)


    var vSMA14 = new MAStudy(14, 0, "Close", MAStudy.SIMPLE);
    var vSMA14_of_Open = new MAStudy(14, 0, "Open", MAStudy.SIMPLE);
    var vLastAlert = -1;

    function preMain() {

    setPriceStudy(false);
    setStudyTitle("14movC-O");
    setCursorLabelName("14maC-O", 0);
    //setCursorLabelName("14maC-Ob", 1);
    setDefaultBarStyle(PS_SOLID, 0);
    setDefaultBarStyle(PS_SOLID, 1);
    setDefaultBarFgColor(Color.green, 0);
    setDefaultBarFgColor(Color.red, 1);
    setDefaultBarThickness(2, 0);
    setDefaultBarThickness(1, 1);
    setPlotType(PLOTTYPE_LINE, 0);
    setPlotType(PLOTTYPE_LINE, 1);
    }

    function main() {

    return (
    vSMA14.getValue(MAStudy.MA)-
    vSMA14_of_Open.getValue(MAStudy.MA)
    );
    } .


    THANK YOU VERY MUCH!!!!!

  • #2
    paoly2007
    See here for the reply to your other message asking the same question
    Alex

    Comment

    Working...
    X