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;
}
/////////////////////////////////////////
}
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;
}
/////////////////////////////////////////
}
Comment