PureBytes Links
Trading Reference Links
|
Tim,
RefreshAll triggers refresh not more often than once per second.
Apparently your stock tree is very large and takes more than one second to refresh.
Right now a solution is to:
a) CLOSE stock tree so RefreshAll does not need to refresh it.
b)
Use this:
periods = Param("periods", 10,1,25,1);
if( StaticVarGet("periods") != periods )
{
StaticVarSet("periods",periods);
oAB = CreateObject("Broker.Application");
oAB.RefreshAll();
}
Plot(RSI(periods), "RSI", colorRed);
Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
From: "Tim Gadd" <timgadd@xxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Tuesday, February 15, 2005 3:41 AM
Subject: [amibroker] Question re: Automatic Refresh of Static Variables from Code
>
>
> I want to use the PARAM function to interactively change a common
> lookback period for 2 different indicators that appear in 2 different
> panes. For simplicity, lets say I want an RSI plot in 2 different
> panes. With the code below, I can change the lookback period for the
> first plot by right clicking in the pane and using the slider.
>
> periods = Param("periods", 10,1,25,1);
> StaticVarSet("periods",periods);
> Plot(RSI(periods), "RSI", colorRed);
>
> With the following code for the second plot, the lookback period in
> the second plot will change to that of the first plot, but only if I
> manually Refresh (using the toolbar icon or menu or keyboard
> shortcut).
>
> periods = StaticVarGet("periods");
> Plot( RSI(periods), "RSI", colorBlue);
>
> I have been informed that, by adding the following code to the second
> plot, I will not have to manually Refresh.
>
> oAB = CreateObject("Broker.Application");
> oAB.RefreshAll();
>
> When I add this to the code of the second plot, I get an automatic
> Refresh alright, but it is constant and nonstop. It is nearly
> impossible to do anything else in Amibroker (the "Filling Symbol
> Tree ... please wait" message is continually displayed for each
> Refresh).
>
> I hope there is way to have the Refresh triggered only one time when
> the slider is moved to a new value, or at least to set the frequency
> of the Refresh.
>
> Help appreciated,
>
> Tim Gadd
>
>
>
>
>
>
> Check AmiBroker web page at:
> http://www.amibroker.com/
>
> Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
> Yahoo! Groups Links
>
>
>
>
>
>
>
>
------------------------ Yahoo! Groups Sponsor --------------------~-->
In low income neighborhoods, 84% do not own computers.
At Network for Good, help bridge the Digital Divide!
http://us.click.yahoo.com/EpW3eD/3MnJAA/cosFAA/GHeqlB/TM
--------------------------------------------------------------------~->
Check AmiBroker web page at:
http://www.amibroker.com/
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|