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

Re: [amibroker] Re: How to create a new ticker?



PureBytes Links

Trading Reference Links

Try this:
spx=Foreign("!SPX","C");	//use your own tickers for this
Vix=Foreign("!VIX","C");	//thiese are the tickers in my DB
ticker=spx/Vix;
Plot(ticker,"SPX/VIX",colorBlack,styleLine);
Regards,
Ed

Claud Hou wrote:
> 
> Appreciate if anyone can point out what I missed.
> 
> Obviously there is no problem to plot this:
> SPX_VIX=Foreign( "^SPX", "Close" )/Foreign( "^VIX", "Close" );
> 
> My question is how to define this thing as a "stock".
> 
> Thanks.
> 
> 
> --- In amibroker@xxxxxxxxxxxxxxx, "Claud Hou" <hclaud_98@xxxx> wrote:
> 
>>That has syntax error.
>>
>>--- In amibroker@xxxxxxxxxxxxxxx, "Christoper" <turkey@xxxx> wrote:
>>
>>>Try something like:
>>>AddToComposite(SPX_VIX, Foreign( "^SPX", "Close" )/Foreign
> 
> ( "^VIX",
> 
>>>"Close" ), "C");
>>>
>>>Then plot SPX_VIX.
>>>
>>>... fyi besides the manual, it always helps me to check the 
> 
> online 
> 
>>AFL
>>
>>>library to see the various ways people use the functions.
>>>http://www.amibroker.com/library/list.php
>>>
>>>--- In amibroker@xxxxxxxxxxxxxxx, "Claud Hou" <hclaud_98@xxxx> 
>>
>>wrote:
>>
>>>>Seems to me, the only thing AddToComposite does is counting.
>>>>
>>>>--- In amibroker@xxxxxxxxxxxxxxx, "Claud Hou" <hclaud_98@xxxx> 
>>
>>wrote:
>>
>>>>>Tried this, but don't work. Read the manual several times, 
>>
>>can't 
>>
>>>>>figure out why. Any hints? Thanks!
>>>>>
>>>>>SPX_VIX=Foreign( "^SPX", "Close" )/Foreign( "^VIX", "Close" );
>>>>>AddToComposite(SPX_VIX,"~SPX_VIX","V");
>>>>>Buy=0;
>>>>>
>>>>>Change "V" to "X" "C" "H" "L" does not help at all.
>>>>>
>>>>>
>>>>>--- In amibroker@xxxxxxxxxxxxxxx, "Christoper" <turkey@xxxx> 
>>
>>wrote:
>>
>>>>>>AddToComposite = ...
>>>>>>
>>>>>>--- In amibroker@xxxxxxxxxxxxxxx, "Claud Hou" 
>>
>><hclaud_98@xxxx> 
>>
>>>>>wrote:
>>>>>
>>>>>>>I want to create a new ticker named "spx_vix", defined by 
>>>>>>>SPX_VIX=Foreign( "^SPX", "Close" ) /Foreign
>>
>>( "^VIX", "Close" );
>>
>>>>>>>the new ticker "spx_vix" shall be same as any stock 
> 
> symbol 
> 
>>>>like 
>>>>
>>>>>MSFT
>>>>>
>>>>>>>how to do that?
>>>>>>>
>>>>>>>Thanks!!
> 
> 
> 
> 
> 
> 
> 
> 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 --------------------~--> 
What would our lives be like without music, dance, and theater?
Donate or volunteer in the arts today at Network for Good!
http://us.click.yahoo.com/Tcy2bD/SOnJAA/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/