PureBytes Links
Trading Reference Links
|
Thomas,
When dealing with multiple panes and static variable of all kinds, you
have to really understand the internal sequencing of events in AFL
formulas. To keep things as simple as possible, I do everything in
one chart. However, that does not mean it is not possible to do what
you want. I am guessing that the issue is that the event that causes
a refresh of the main chart to recalculate the static array variables
is not sent to the second pane. It did not get an event to tell it it
needs to run its AFL formula again, so the display is just sitting
there with the old information until some event causes it to refresh
(like clicking on the chart). One thing you can try is to just apply
a timed refresh to the second slave pane that is just plotting the
results. That way it will follow any changes to the other pane, but
with very low overhead.
BR,
Dennis
On Mar 13, 2009, at 10:05 AM, Thomas Ludwig wrote:
> Barry,
>
> thanks for your hints. Unfortunately, they didn't solve my problem.
> On the
> contrary, now even scrolling through dates doesn't cause a re-
> calculation any
> more.
>
> Greetings,
>
> Thomas
>
> On Friday 13 March 2009 14:51:30 Barry Scarborough wrote:
>> I assume when you switch between symbols you want to preserve the
>> data
>> relative for each symbol. If so the names must be unique. Have you
>> tried
>> using a prefix to differentiate the symbols when you switch them?
>> Try this
>> and see if it works when you change tickers.
>>
>> StaticVarSet(name() + "varccibuysignals", Buy1);
>>
>> If you also switch time frames add the interval,
>>
>> VarPfx = name() + numtostr(interval, 1, false);
>> StaticVarSet(VarPfx + "varccibuysignals", Buy1);
>>
>> This will give your static vars a unique name between tickers and
>> times.
>>
>> Barry
>>
>> --- In amibroker@xxxxxxxxxxxxxxx, Thomas Ludwig <Thomas.Ludwig@xxx>
>> wrote:
>>> Hello,
>>>
>>> I've implemented this new feature in AB in a certain layout. I'm
>>> using a
>>> variable CCI in one pane and plot the signals in the other.
>>>
>>> So in the one pane I defined:
>>>
>>> [...]
>>> StaticVarSet("varccibuysignals", Buy1);
>>> StaticVarSet("varccisellsignals", Sell1);
>>> StaticVarSet("varcci", varcci(Avg,n));
>>>
>>> and in the other one:
>>> [...]
>>> varccibuysig = StaticVarGet("varccibuysignals");
>>> varccisellsig = StaticVarGet("varccisellsignals");
>>> varcci = StaticVarGet("varcci");
>>> PlotShapes(varcciBuysig*shapeUpTriangle,colorGreen,0,L,-25);
>>> PlotShapes(varcciSellsig*shapeDownTriangle,colorRed,0,H,-25);
>>> Varccicolor=IIf(Varcci>0,colorGreen,colorRed);
>>> Plot(2,"",Varccicolor,styleArea|styleOwnScale,0,100,0);
>>> Plot( 3,"",colorBlack,styleOwnScale|styleArea|styleNoLabel,0, 100 );
>>>
>>> This works very well - with one exception: If I scroll through my
>>> symbols
>>> tree to plot other symbols with this layout, the signals in the
>>> second
>>> pane are not properly updated/synchronized. Only if I scroll through
>>> dates in the scroll bar at the bottom, the signals are re-
>>> calculated. I
>>> guess it's a caching problem. How can programmatically avoid it? I
>>> have
>>> tried using
>>> RequestTimedRefresh( 1 ); and that works. But since I'm not a real-
>>> time
>>> trader (only EOD) I wonder if that makes much sense and if there
>>> is a
>>> simpler solution.
>>>
>>> I have a probably similar problem (that has nothing to do with
>>> static
>>> array variables) in another layout. In one of its sheets I'm
>>> calculating
>>> several market indicators (zscores for put/call-ratio, VIX, VXN,
>>> etc.)
>>> using the Foreign() function. If I click this sheet for the first
>>> time
>>> not all of these indicators are properly displayed. Only after
>>> scrolling
>>> through dates or switching to another sheet and switching back
>>> they are
>>> displayed as they should.
>>>
>>> Any help would be appreciated.
>>>
>>> Greetings,
>>>
>>> Thomas
>>
>> ------------------------------------
>>
>> **** IMPORTANT PLEASE READ ****
>> This group is for the discussion between users only.
>> This is *NOT* technical support channel.
>>
>> TO GET TECHNICAL SUPPORT send an e-mail directly to
>> SUPPORT {at} amibroker.com
>>
>> TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
>> http://www.amibroker.com/feedback/
>> (submissions sent via other channels won't be considered)
>>
>> For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
>> http://www.amibroker.com/devlog/
>>
>> Yahoo! Groups Links
>>
>>
>>
>
>
> ------------------------------------
>
> **** IMPORTANT PLEASE READ ****
> This group is for the discussion between users only.
> This is *NOT* technical support channel.
>
> TO GET TECHNICAL SUPPORT send an e-mail directly to
> SUPPORT {at} amibroker.com
>
> TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
> http://www.amibroker.com/feedback/
> (submissions sent via other channels won't be considered)
>
> For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
> http://www.amibroker.com/devlog/
>
> Yahoo! Groups Links
>
>
>
------------------------------------
**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.
TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com
TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/amibroker/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:amibroker-digest@xxxxxxxxxxxxxxx
mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx
<*> 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/
|