Hi,
I have been trying to write a code to get a visual waning on the screen when there are 15seconds remaining in the time fame in use.
I have a code wherein the time left is indicated in the title, in yellow, a screenshot is pasted below.
The code I am using is below :-
_SECTION_BEGIN("Title Time Left");
SetChartOptions(0,chartHideQuoteMarker,chartShowDates);
GraphLabelDecimals = 2;
GraphXSpace = 10;
function GetSecondNum()
{
Time = Now( 4 );
Seconds = int( Time % 100 );
Minutes = int( Time / 100 % 100 );
Hours = int( Time / 10000 % 100 );
SecondNum = int( Hours * 60 * 60 + Minutes * 60 + Seconds );
return SecondNum;
}
RequestTimedRefresh( 1 );
TimeFrame = Interval();
SecNumber = GetSecondNum();
SecsLeft = SecNumber - int( SecNumber / TimeFrame ) * TimeFrame;
SecsToGo = TimeFrame - SecsLeft;
if( Status("action") == actionIndicator )
( Title = EncodeColor(colorBlue)+ "Name()" + " - " + Name() + " - " + EncodeColor(colorRed)+ Interval(2) + EncodeColor(colorYellow)+" || " +WriteVal(SecsToGo,0)+" ||"
+ EncodeColor(colorGreen) + " || " + Date() + " ||" +EncodeColor(colorBlack)+
StrFormat(" Op = %g | Hi = %g | Lo = %g | Cl = %g ", O,H,L,C)+ EncodeColor(colorGold)+" | OI = "+WriteVal(OI,0)+ EncodeColor(colorBlue)+" | Volume = "+WriteVal(V,0));
Plot( (C), "Close", ParamColor("Color", colorDefault ),GetPriceStyle());
_SECTION_END();
Instead of staring at the time left in the title is it possible to have some sort of flashing message on the screen?
Thanks in advance