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

[amibroker] Can you refresh only ONE chart instead of using the RefreshAll() Method



PureBytes Links

Trading Reference Links

Title: Can you refresh only ONE chart instead of using the RefreshAll() Method

Hi,

Im setting StaticVarSet in a parent chart to set a global variable that affects child charts.   Awhile back Tomasz posted some code (my version below) that used the AB.RefreshAll() method to automatically refresh all other charts.  By automatically refreshing the charts, StaticVarGet is executed in the child charts, the global variable is retrieved, and the code in other charts is run.

This works nicely, with one exception the refresh is very slow.  This is probably because some of my charts have some heavyweight code that runs very slowly.   (Normally I dont use these charts except for some entries and exits.)  So heres the question…

Is possible to refresh ONE target chart?  For example the only child chart that I want to refresh is ChartID 1265.  Is it possible refresh JUST Chart 1265 from code?

Thanks and regards,

Dan.

OldOverlayMktCapBool= StaticVarGet( "OverlayMktCapBool" );
if (    IsEmpty(OldOverlayMktCapBool)
   OR OldOverlayMktCapBool != OverlayMktCapBool
   )
   {
   StaticVarSet( "OverlayMktCapBool", OverlayMktCapBool);
   AB = CreateObject("Broker.Application");
   AB.RefreshAll(); // refreshes other charts

   }



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





YAHOO! GROUPS LINKS