This may save others the time to plot symbol/tick normalized charts.
I use this code quite often:

At the beginning of the price I have: (names are for IB data)

 

NameL = StrLeft(Name(),4); //truncate Symbol to 4 cahracters used in Titles

SymbL1 = StrLeft(Name(),1); //truncate name to 1 left char, differentiate start time of currencies

SymbL2 = StrLeft(Name(),2); //truncate name to 2 left character

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

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

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

 

Title = NameL+StrFormat("- {{INTERVAL}} {{DATE}} , C=%g, V={{VALUES}}"+NumToStr(Volume,1.0,separator=True), C);

 

//permanent TickSize for all futures

TickSize_ = IIf(SymbL1 == "6" OR SymbL2 ==  "E7", 0.0001,

            IIf(SymbL2 == "6B" , 0.0002,

            IIf(SymbL2 == "6J" , 0.000001,

            IIf(SymbL2 == "ER" OR SymbL2 == "SP" OR SymbL2 == "IN" OR SymbL2 == "ME", 0.1,

            IIf(SymbL2 == "ES" OR SymbL2 == "NQ", 0.25,

            IIf(SymbL2 == "YM" OR SymbL2 == "TI", 1.0, 0.01))))));

 

InvTick = Nz(1/TickSize_) ; // save On divisions

 

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

StaticVarSet("InvTick"+Name(),InvTick[BarCount-1] ) ; 

 

___________________________________________________________

 

Then, in each pane that uses this information I have the corresponding match:

 

 

NameL  = StaticVarGet("NameL"+Name());

SymbL1 = StaticVarGet("SymbL1"+Name());

SymbL2 = StaticVarGet("SymbL2"+Name());

 

TickSize_ = StaticVarGet("TickSize_"+Name());

InvTick   = StaticVarGet("InvTick"+Name());



Joseph Biran
____________________________________________

__._,_.___

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 NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

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





SPONSORED LINKS
Investment management software Investment property software Investment software
Investment tracking software Return on investment software

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to