Announcement

Collapse
No announcement yet.

Plot problem

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

  • Plot problem

    Hello,
    On the following indicator, that plots a dot above a bar at a certain time, the dot moves in real time when a new bar is created. I would like to force the dot to stay over the bar it is supposed to mark. Is there a way to do this? thanks.

    /////////////////////////////////////////

    function preMain()
    {
    setPriceStudy(true);

    }

    function main(Time1, Time2){
    if(Time1 == null) {
    Time1 =12;
    if(Time2 == null){
    Time2 = 14 ;
    }
    var vHour = getHour();
    var vMinute = getMinute();

    if(vHour == Time1 && vMinute == 0){
    drawShapeAbsolute(getCurrentBarIndex(), high() + 1, Shape.DIAMOND, "", Color.red, Shape.TOP, getCurrentBarIndex());
    }
    if(vHour == Time2 && vMinute == 0){
    drawShapeAbsolute(getCurrentBarIndex(), high() + 1, Shape.DIAMOND, "", Color.red, Shape.TOP, getCurrentBarIndex());
    }
    return;

    }
    /////////////////////////////////////////
    }

  • #2
    Simple change...

    Change the drawShapeAbsolute to drawShapeRelative and everything should work perfectly.

    B
    Brad Matheny
    eSignal Solution Provider since 2000

    Comment


    • #3
      Ahh, thanks for your help.
      Dylan

      Comment

      Working...
      X