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

[amibroker] Re: Reference to another security



PureBytes Links

Trading Reference Links


OOPS, the section name should be _SECTION_BEGIN("My Foreign DEMA"); 
or something that makes sense to you. I got lazy an just copied it 
from another indicator and forget to change the name.

Barry

 --- In amibroker@xxxxxxxxxxxxxxx, "Razzbarry" <razzbarry@xxxx> 
wrote:
> The actual formula is for a backtest and plot follows. Just copy 
and paste it into an AB formula window and test it. I assume you 
have AB release 4.70. But you will need sell logic to use this in 
back test. Anyway this may get you going in conversion form MS. 
> 
> If you use this as an indicator to see if the results are the same 
as MS. Once you have created and saved the formula just go to 
Workspace/Charts, find the formula and click on it and take Insert 
linked. It will add a chart to the bottom of the page. then drag and 
drop a DEMA to the price chart and you will see the buy points. The 
formula produces positive spikes at the buy points.
> 
> Actually I went the same route, MS first and then AB. I think you 
will be very you switched. You will; have to convert all your MA 
logic if memory serves me well. I think MS has a generic moving 
average formulas and a parm tells it which type to use. AB has 
separate MA types so that is what you will have to convert.
> 
> You can import your NASDAQ and rimm data into AB to test this. 
When you paste this make sure the comments, green below, are all on 
one line or the program will fail.
> 
> Happy to help a MS defector.
> 
> Happy coding,
> Barry
> 
> _SECTION_BEGIN("ADX + EMA + MACD"); 
> 
> // this will work with any stock 
> ixic = Foreign("^IXIC", "C"); // I use ^IXIC for the NASDAQ
> period = Param("NASDAQ DEMA period", 200, 20, 400, 10); // default 
= 200, range = 20-400, step = 10 
> ixicDema = DEMA(ixic, period); 
> stkPeriod = Param("Stock period", 20, 1, 100, 1); 
> LclDema = DEMA(C, stkPeriod); 
> 
> Buy = Cover = C < LclDema AND ixic > ixicDema; 
> 
> // this is not needed for backtest but it will plot the conditions 
in a window so you can see all the conditions on a page. 
> // drag and drop a DEMA to the price chart and the green spike 
will show where all the conditions meet. 
> Plot(ixicDema, "ixicDema", colorBlack); 
> Plot(ixic, "ixic", colorBrown); 
> Plot(Buy * ixic, "BUY", colorGreen); 
> 
> // explore 
> Filter = Buy; 
> AddColumn(Buy, "Buy", 1.0); 
> 
> _SECTION_END(); 
> 
> 
>   ----- Original Message ----- 
>   From: Terry 
>   To: amibroker@xxxxxxxxxxxxxxx 
>   Sent: Thursday, March 17, 2005 10:25 AM
>   Subject: Re: [amibroker] Reference to another security
> 
> 
>   There are a couple of ways to do this, one is SetForeign and the 
other 
>   is simply Foreign, which seems easiset in your case. You can 
look it up 
>   in help.
> 
>   DEMA(Foreign("$COMPQ","C"),200) gets you the 200 day DEMA of the 
Nasdaq 
>   Composite.
> 
>   Terry
> 
>   sebastiandanconia wrote:
> 
>   >
>   >Hi, all.:)  I'm seriously considering Amibroker (a fed-up 
Metastock 
>   >defector), but have a simple question I haven't found the 
answer to:  
>   >Using the back-tester, is it possible to refer to another 
security?  
>   >For example, "buy RIMM at a retracement to a 20-dema, but only 
if the 
>   >Nasdaq Composite is above a 200-dema."
>   >
>   >
>   >TIA and luck to all,
>   >
>   >Sebastian
>   >
>   >
>   >
>   >
>   >
>   >
>   >
>   >
>   >
>   >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
>   >
>   >
>   >
>   > 
>   >
>   >
>   >
>   >
>   >  
>   >
> 
> 
>   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 Sponsor 
>               ADVERTISEMENT
>              
>        
>        
> 
> 
> -------------------------------------------------------------------
-----------
>   Yahoo! Groups Links
> 
>     a.. To visit your group on the web, go to:
>     http://groups.yahoo.com/group/amibroker/
>       
>     b.. To unsubscribe from this group, send an email to:
>     amibroker-unsubscribe@xxxxxxxxxxxxxxx
>       
>     c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms 
of Service.





------------------------ 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
--------------------------------------------------------------------~-> 

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

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