Announcement

Collapse
No announcement yet.

help 1st time user

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

  • help 1st time user

    lookin to try to make an djusted $tick by using a 1 min interval and adding open hi low close of period and ploting on a chart if someone could help me id appreciate it below i modified a efs someone had written but its not working


    function preMain() {
    setPriceStudy(true);
    setStudyTitle("Adjusted Tick");
    setCursorLabelName("Adjusted Tick");
    // Pivot Point
    setDefaultBarStyle(PS_SOLID);
    setDefaultBarFgColor(Color.RGB(0,0,0));
    setDefaultBarThickness(1);
    }

    var bInit = false;
    var xOpen = null;
    var xHigh = null;
    var xLow = null;
    var xClose = null;

    function main() {

    if(bInit == false){
    xOpen = open(inv("M"));
    xHigh = high(inv("M"));
    xLow = low(inv("M"));
    xClose = close(inv("M"));
    bInit = true;
    }

    var vOpen = xOpen.getValue(-1);
    var vHigh = xHigh.getValue(-1);
    var vLow = xLow.getValue(-1);
    var vClose = xClose.getValue(-1);

    if(vOpen == null || vHigh == null || vLow == null || vClose == null)
    return;

    vPP = (vOpen+vHigh+vLow+vClose);

    return (vPP);
    }
Working...
X