Buenas noches:
Esta es mi primera comunicacin en este foro y siento no poder escribir en ingles. Empleo para entenderme un traductor automatico y me va bastante bien.
Necesito un reloj que me diga cuanto tiempo le falta a la vela para finalizar.
Tengo un AFL que me funciona bien en 1 minuto, pero no en el resto de los tiempos, en particular en 3 minutos. Alguien me puede ayudar y enviarme un AFL que funcione en 3 minutos.
El cdigo que uso en 1 minuto es el siguiente y no entiendo porque no funciona en 3 minutos. Gracias
Good night:
This is my first communication in this forum and I feel not to be able to write in English. Use to understand an automatic translator to me and goes to me rather well.
I need a clock that says to me how long needs to the candle to finalize.
I have a AFL that works to me well in 1 minute, but not in the rest of the times, in particular in 3 minutes. Somebody can help and send a AFL to me me that works in 3 minutes.
The code that use in 1 minute is the following one and I do not understand because it does not work in 3 minutes. Thanks
CODE:
// Timer
tempnum = Now( 4 ) - TimeNum();
TimeRem = Interval() - ((int(tempnum[BarCount - 1] / 100) * 60) + (tempnum[BarCount - 1] - int(tempnum[BarCount - 1] / 100) * 100));
if (TimeRem[BarCount - 1] < 0) TimeRem = 0;
MinuteVar = int(TimeRem / 60);
SecondsVar = int(frac(TimeRem / 60) * 60);
if (TimeRem[BarCount - 1] > 60)
{
TitleTimeRem = EncodeColor(colorWhite) + MinuteVar + ":" + WriteIf(SecondsVar > 9, "", "0") + SecondsVar;
}
else if (TimeRem[BarCount - 1] > 20)
{
TitleTimeRem = EncodeColor(colorBlue) + MinuteVar + ":" + WriteIf(SecondsVar > 9, "", "0") + SecondsVar;
}
else
{
TitleTimeRem = EncodeColor(colorBlue) + MinuteVar + ":" + WriteIf(SecondsVar > 9, "", "0") + SecondsVar;
}
// Tic/PIP value
TicMult= Param("Tic multiplier(ER2=10,YM=1,ES=4,FOREX=1)",1,0,1000000);
TicDiv= Param("Tic or PIP value(ER2=0.1,YM=1,FOREX=1)",1,0,1000000);
// Rangebar interval
rbint= Param("Rangebar intervalYM=25.0,AB=1.5,NQ=3.75,ES=3.0)",1.0,0.25,1000000);
// Rangebar counter
rbcounter= round(((rbint-(H-L))) * ticmult);
rbcounterpercent= round((rbcounter/(rbint * ticmult))*100);
// Timer/counter title
timercode= Param("Timerminutes=1,rangebar=2)",1,1,2);
timetitle= WriteIf(timercode==1,TitleTimeRem, EncodeColor(colorBlack)+ "Countdown " + rbcounter + " (" + rbcounterpercent + "%)");
// Price Panel
Closecolor=WriteIf(C==H AND H>Ref(H,-1),EncodeColor(colorWhite),WriteIf(C==L AND L<Ref(L,-1),EncodeColor(colorWhite),EncodeColor(colorWhite)));
// Title
Title = "\n" + "" + EncodeColor(colorWhite) + Date() + "\n" + "\n" +
timetitle + "\n" + "\n";
_SECTION_END();
Esta es mi primera comunicacin en este foro y siento no poder escribir en ingles. Empleo para entenderme un traductor automatico y me va bastante bien.
Necesito un reloj que me diga cuanto tiempo le falta a la vela para finalizar.
Tengo un AFL que me funciona bien en 1 minuto, pero no en el resto de los tiempos, en particular en 3 minutos. Alguien me puede ayudar y enviarme un AFL que funcione en 3 minutos.
El cdigo que uso en 1 minuto es el siguiente y no entiendo porque no funciona en 3 minutos. Gracias
Good night:
This is my first communication in this forum and I feel not to be able to write in English. Use to understand an automatic translator to me and goes to me rather well.
I need a clock that says to me how long needs to the candle to finalize.
I have a AFL that works to me well in 1 minute, but not in the rest of the times, in particular in 3 minutes. Somebody can help and send a AFL to me me that works in 3 minutes.
The code that use in 1 minute is the following one and I do not understand because it does not work in 3 minutes. Thanks
CODE:
// Timer
tempnum = Now( 4 ) - TimeNum();
TimeRem = Interval() - ((int(tempnum[BarCount - 1] / 100) * 60) + (tempnum[BarCount - 1] - int(tempnum[BarCount - 1] / 100) * 100));
if (TimeRem[BarCount - 1] < 0) TimeRem = 0;
MinuteVar = int(TimeRem / 60);
SecondsVar = int(frac(TimeRem / 60) * 60);
if (TimeRem[BarCount - 1] > 60)
{
TitleTimeRem = EncodeColor(colorWhite) + MinuteVar + ":" + WriteIf(SecondsVar > 9, "", "0") + SecondsVar;
}
else if (TimeRem[BarCount - 1] > 20)
{
TitleTimeRem = EncodeColor(colorBlue) + MinuteVar + ":" + WriteIf(SecondsVar > 9, "", "0") + SecondsVar;
}
else
{
TitleTimeRem = EncodeColor(colorBlue) + MinuteVar + ":" + WriteIf(SecondsVar > 9, "", "0") + SecondsVar;
}
// Tic/PIP value
TicMult= Param("Tic multiplier(ER2=10,YM=1,ES=4,FOREX=1)",1,0,1000000);
TicDiv= Param("Tic or PIP value(ER2=0.1,YM=1,FOREX=1)",1,0,1000000);
// Rangebar interval
rbint= Param("Rangebar intervalYM=25.0,AB=1.5,NQ=3.75,ES=3.0)",1.0,0.25,1000000);
// Rangebar counter
rbcounter= round(((rbint-(H-L))) * ticmult);
rbcounterpercent= round((rbcounter/(rbint * ticmult))*100);
// Timer/counter title
timercode= Param("Timerminutes=1,rangebar=2)",1,1,2);
timetitle= WriteIf(timercode==1,TitleTimeRem, EncodeColor(colorBlack)+ "Countdown " + rbcounter + " (" + rbcounterpercent + "%)");
// Price Panel
Closecolor=WriteIf(C==H AND H>Ref(H,-1),EncodeColor(colorWhite),WriteIf(C==L AND L<Ref(L,-1),EncodeColor(colorWhite),EncodeColor(colorWhite)));
// Title
Title = "\n" + "" + EncodeColor(colorWhite) + Date() + "\n" + "\n" +
timetitle + "\n" + "\n";
_SECTION_END();