[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [amibroker] Tick charts and time



PureBytes Links

Trading Reference Links

Title: Normal.dot Template

 

As you can tell I am way behind my mail reading.

 

I have tried to tackle the same problem for the last month or so. Here is the code I use
to determine the number of ticks left in a bar (derived with much help of AB tech support)

 

 

//tick counter

TicksInBar = IIf(Interval(1)<0,-Interval(1),0);

if (TicksInBar >0)

{

if( IsEmpty(StaticVarGet("IsInitialized"+Name())) OR

       StaticVarGet("LastBarIndex"+Name())!= LastValue(BarIndex()))

{

StaticVarSet("TickCounter"+Name(),0);

StaticVarSet("LastVolume"+Name(),0);

StaticVarSet("TotalVolume"+Name(),0);

StaticVarSet("IsInitialized"+Name(),1);

StaticVarSet("LastBarIndex"+Name(),LastValue(BarIndex()));

}

 

LastVolume = GetRTData("TotalVolume");   // Name()+ not acceptable??

NewTick = LastVolume != StaticVarGet("LastVolume"+Name());

 

if( NewTick )

{

TickCount = StaticVarGet("TickCounter"+Name());

StaticVarSet("TickCounter"+Name(),++TickCount);

StaticVarSet("LastVolume"+Name(), LastVolume );

}

PrevVol = StaticVarGet("LastVolume"+Name());

TickCount = StaticVarGet("TickCounter"+Name());

TicksRemaining = TicksInBar - TickCount;

Reset = IIf(TicksRemaining <=0, 0,1);

 

// for debug

/*

//LV = StaticVarGet("LastVol"+Name());

Title = Title+"\nPrevVolume= "+NumToStr(PrevVol,1.0,False)+

//"\nLastVolume= "+NumToStr(LV,1.0,False)+

"\nTicksReamining: "+NumToStr(TicksRemaining ,1,False);

*/

}

 

Unfortunately, this is not a complete solution it is still a work in progress.
when I finish my other computer chores I will give it another try.

I can not get the tick counter to synchronize with an actual tick chart bars.
this solution as is provides sometimes negative number of tick to the end
of the bar. If you or anybody else knows how to solve this issue I will appreciate
it much.

 



Joseph Biran
____________________________________________

 


From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of Graham
Sent: Saturday, February 11, 2006 12:17 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Tick charts and time

 

This is probably elementary to most here but I am looking at the tick
charts and want to check my observation that a new tick bar (eg 100
ticks) is started at the beginning of each day

--
Cheers
Graham
AB-Write >< Professional AFL Writing Service
Yes, I write AFL code to your requirements
http://e-wire.net.au/~eb_kavan/ab_write.htm



Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.html





SPONSORED LINKS
Investment management software Real estate investment software Investment property software
Software support Real estate investment analysis software Investment software


YAHOO! GROUPS LINKS