Hi Guys..
IM using below code to see how much time left to complete one candle.
But now problem is when i selected time frame as ticks .. it not showing how many ticks left?
can any one add one more line to find " how many ticks left" or how many ticks done in current candle?
_SECTION_BEGIN("Time Left");
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();
Newperiod = SecNumber % TimeFrame == 0;
SecsLeft = SecNumber - int( SecNumber / TimeFrame ) * TimeFrame;
SecsToGo = TimeFrame - SecsLeft;
x=Param("xposn",434,0,1000,1);
y=Param("yposn",40,0,1000,1);
GfxSelectSolidBrush( ColorRGB( 230, 230, 230 ) );
GfxSelectPen( ColorRGB( 230, 230, 230 ), 2 );
if ( NewPeriod )
{
GfxSelectSolidBrush( colorYellow );
GfxSelectPen( colorYellow, 2 );
Say( "" );
}
if ( SecsToGo == 302)
Say(" IOIOIOIOIO ");
cx = Param( "cxposn", 1080, 0, 1250, 1 );
cy = Param( "cyposn", 5, 0, 500, 1 );
GfxSelectFont( "Arial", 14, 98, False );
//gfxcup = SelectedValue(C > Ref(C,-1));
//gfxpcolor = IIf(gfxcup,colorBrightGreen,colorRed);
//GfxSetTextColor(colorBlue);
GfxSetTextColor( colorBlack );
GfxTextOut( "Time Left: " + SecsToGo + " ", cx, cy );
_SECTION_END();
Thanks in advance.
IM using below code to see how much time left to complete one candle.
But now problem is when i selected time frame as ticks .. it not showing how many ticks left?
can any one add one more line to find " how many ticks left" or how many ticks done in current candle?
_SECTION_BEGIN("Time Left");
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();
Newperiod = SecNumber % TimeFrame == 0;
SecsLeft = SecNumber - int( SecNumber / TimeFrame ) * TimeFrame;
SecsToGo = TimeFrame - SecsLeft;
x=Param("xposn",434,0,1000,1);
y=Param("yposn",40,0,1000,1);
GfxSelectSolidBrush( ColorRGB( 230, 230, 230 ) );
GfxSelectPen( ColorRGB( 230, 230, 230 ), 2 );
if ( NewPeriod )
{
GfxSelectSolidBrush( colorYellow );
GfxSelectPen( colorYellow, 2 );
Say( "" );
}
if ( SecsToGo == 302)
Say(" IOIOIOIOIO ");
cx = Param( "cxposn", 1080, 0, 1250, 1 );
cy = Param( "cyposn", 5, 0, 500, 1 );
GfxSelectFont( "Arial", 14, 98, False );
//gfxcup = SelectedValue(C > Ref(C,-1));
//gfxpcolor = IIf(gfxcup,colorBrightGreen,colorRed);
//GfxSetTextColor(colorBlue);
GfxSetTextColor( colorBlack );
GfxTextOut( "Time Left: " + SecsToGo + " ", cx, cy );
_SECTION_END();
Thanks in advance.