Announcement
Collapse
No announcement yet.
Tick Bar - Ticks remaining
Collapse
This topic is closed.
X
X
-
I have adapted tib_Counter.efs trying to give an option to display the current minute or current second. I have an AddOption, and transfer that option into main(), then use if statements to give the proper display.
I am finding that the display is static on my time interval chart (ES #F at 1-minute). The seconds display does not change during the bar, as I want it to.
I am trying to get the current seconds, not the bar timestamp, so I am using a date object. But I have something wrong. I have seem the time-remaining efs, but on time-interval charts I really want to display the actual minutes or seconds, not a countdown.
I would appreciate any help you can offer. Thanks. Joe.Attached Files
Comment
-
Thank you for that advice, Alexis. This gives the result I want.
May I ask why, in this case, it does not work to assign the new Date() object once, using the bInit structure? Why must it be re-assigned each time the efs is called?
When calling functions, we only need to assign the study variable once, then we use the getValue. Is the date object handled differently?
Thank you again. Joe.
Comment
-
Volume countdown
Alexis
I use primarily volume charts. I have tried to modify your efs to count down volume but everything I try I am getting a NaN error. I cannot figure out why. I have attached the efs and was wondering if you could help me modify it to countdown volume.
/***********************************
Alexis C. Montenegro © February 2004
************************************/
function preMain() {
setPriceStudy(true);
setStudyTitle("TIC Countdown");
setCursorLabelName("TIC Countdown");
setShowCursorLabel(true)
}
var y = 0;
function main() {
var x = getInterval();
var n = parseInt(x);
if(1==1)
y += 1;
if(getBarState()==BARSTATE_NEWBAR){
y=1;
}
var z = n-y;
drawTextRelative(3,close(),z,Color.blue,null,Text. BOLD|Text.VCENTER,"Arial",16,"TIB");
return z+" ";
}Last edited by pmcd; 02-13-2007, 02:37 PM.
Comment
-
pcmd
Enclosed below is a revised version of the efs that should provide the correct count down with Volume bars
Alex
PHP Code:/***********************************
Alexis C. Montenegro © February 2004
************************************/
function preMain() {
setPriceStudy(true);
setStudyTitle("Vol Countdown");
setCursorLabelName("Vol Countdown");
setShowCursorLabel(true)
}
function main() {
var x = getInterval();
var n = parseInt(x);
var z = n-volume(0);
drawTextRelative(3,close(),z,Color.blue,null,Text.BOLD|Text.VCENTER,"Arial",16,"TVB");
return z+" ";
}
Comment
-
kevinmclark
To do that just add a condition [after the line where z is calculated] that checks for z to be less than a value of your choice in which case it triggers an alert eg
PHP Code:if(z < yourvalue) Alert.playSound("ding.wav");
Alex
Comment
-
HJSeese
Not sure which script you are referring to [ie the tick or volume counter] but as far as I can see both are executing on every trade regardless of whether this was at the same or different price than the previous trade [see enclosed screenshots as an example]
Alex
Originally posted by HJSeese View PostOn my charts, the tick counter only seems to advance when there is a price change. It does not update on every order that comes through the time and sales window. Is this the correct behavior or I am missing a setting.
Thanks.
Comment
Comment