How to count TICKS in Amibroker

madhavareddy1203

Well-Known Member
#1
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.
 

madhavareddy1203

Well-Known Member
#2
You can't show how many ticks are left as for example 1 minute can have so much ticks and another minute can have some other amount of ticks. Gosh even one second can have 38 ticks or more and another second can have just 5 ticks. It 's like asking Nostramus how many ticks will come next. Nonsense
Hope u dont know about Ticks.

Supoose if i select time frame as 100 ticks. if 50 ticks done means.. 50 ticks left to complete candle naa..

before answer plz go completely. I dont want time.. cos already i have time code.

Thanks for ur reply.
 
#3
Hope u dont know about Ticks.

Supoose if i select time frame as 100 ticks. if 50 ticks done means.. 50 ticks left to complete candle naa..

before answer plz go completely. I dont want time.. cos already i have time code.

Thanks for ur reply.

First of all you mentioned "timeframe as ticks"!
50 ticks bar and 100 ticks bar have got nothing to do with timeframe.
Your first post implied you wanna count how many ticks left in 1 minute bar for example. So before writing nonsense better don't post nonsense in 1st post.
 

madhavareddy1203

Well-Known Member
#4
First of all you mentioned "timeframe as ticks"!
50 ticks bar and 100 ticks bar have got nothing to do with timeframe.
Your first post implied you wanna count how many ticks left in 1 minute bar for example. So before writing nonsense better don't post nonsense in 1st post.
U stop nonsence and plz leave this thread. if u didnt understand u can ask me.. but dont use big words.

If not i will use other words..
 

madhavareddy1203

Well-Known Member
#5
First of all you mentioned "timeframe as ticks"!
50 ticks bar and 100 ticks bar have got nothing to do with timeframe.
Your first post implied you wanna count how many ticks left in 1 minute bar for example. So before writing nonsense better don't post nonsense in 1st post.
Where u kept ur eyes..

"But now problem is when i selected time frame as ticks .. it not showing how many ticks left?"

u missed this.
 

madhavareddy1203

Well-Known Member
#9
What's that in bold letters? Is there written "timeframe as ticks" or is there written "50 ticks bar or 100 tick bar"?
r feeling like good developer.. i dont want help from u.. lot of other people here.. thanks and leave.



timeframe as ticks means.. what.. i can select 1 tick or 20 or 50 or 100..

u didnt know this and giving buildup like developer..

if u dont want to help others just sit in corener and watch..

what u r thinking about ur self..

"I didn't expect anything else from nuts like you. Go into hiding. It's best for everyone. Learn to code and don't expect others to do whole jobs for nothing and you just sitting there and waiting for jobs getting done. So better stfu before opening your useless mouth any longer"

if u r that much good developer why u r coming here.. go and sit