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

Re: [amibroker] Re: NASDAQ Heatmap- use CreateObject?



PureBytes Links

Trading Reference Links

Yes, this script goes into the chart window, not the heat map window.
You set a static variable with the symbol you want it to display.  The  
chart AFL looks at that static variable and if it changes, it does the  
jscript function with the ticker in the static variable passed to it.   
Of course to tell if it has changed, you just compare the current  
ticker to the static variable.

BR
Dennis

On Jan 18, 2009, at 8:32 PM, jorgen_wallgren wrote:

> Hi Dennis,
>
> Cool! Thanks!!!
>
> But one stupid question:
>
> I can for sure be wrong, but it looks like this script will update
> my current window (the one with the NASDAQ heatmap), not the window
> with the chart- or? Or is it about where I add the script?
>
> Thanks,
>
> Jorgen
>
> --- In amibroker@xxxxxxxxxxxxxxx, Dennis Brown <see3d@xxx> wrote:
>>
>>
>> Here you go,
>>
>> //================================================================
>> // jscript FUNCTION to change the active ticker symbol
>> // Call this function once at the end of the AFL formula
>> // Only call it to change tickers, not all the time
>> // It is called with the following:
>> // If(TickerChanged){
>> //	script = GetScriptObject();
>> //	script.SetChartTicker("MSFT");}
>> //
>> EnableScript("JScript");
>> <%
>> function SetChartTicker(newTicker){
>> 	AB = new ActiveXObject("Broker.Application");
>> 	AB.ActiveDocument.Name = newTicker;
>> 	return 1;
>> }
>> %>
>>
>>
>> BR,
>> Dennis
>>
>> On Jan 18, 2009, at 7:32 PM, jorgen_wallgren wrote:
>>
>>> Hi,
>>>
>>> That's not a bad idea. But if I use
>>>
>>> SetForeign(StaticVarGetText("Symbol"));
>>>
>>> in my chart, I see 2 problems. The chart windows still will
> display
>>> the "old" symbols name and period setting. That can be confusing.
>>> Then how can I then use the same chart for choosing a symbol the
>>> traditional way (picking it from the watch List)?
>>>
>>> Or can this method you both suggested still work with some
> additions?
>>>
>>> Thanks,
>>>
>>> Jorgen
>>>
>>>
>>>
>>>
>>> ------------------------------------
>>>
>>> **** IMPORTANT ****
>>> This group is for the discussion between users only.
>>> This is *NOT* technical support channel.
>>>
>>> *********************
>>> TO GET TECHNICAL 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
>>>
>>> *********************************
>>> Yahoo! Groups Links
>>>
>>>
>>>
>>
>
>
>
> ------------------------------------
>
> **** IMPORTANT ****
> This group is for the discussion between users only.
> This is *NOT* technical support channel.
>
> *********************
> TO GET TECHNICAL 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
>
> *********************************
> Yahoo! Groups Links
>
>
>


------------------------------------

**** IMPORTANT ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

*********************
TO GET TECHNICAL 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

*********************************
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/