[amibroker] Re: help in writing a formula

2009-02-17 Thread Mike
Strategies will often result in redundent signals (e.g. receive another buy signal when already holding a position). Also, depending on your settings for position size, number of positions allowed, etc. you may not be able to take all signals. Refer to the user guide for more detail: http://ww

[amibroker] Re: help in writing a formula

2009-02-17 Thread Alan Nouray
Thank you Mike. When I backtest, only one trade shows but on the chart there are many "Buy" & "Sell" signals. Do I do backtest the system by simply using the backtest button? Alan --- In amibroker@yahoogroups.com, "Mike" wrote: > > > Grrr. Sorry, forgot that Yahoo's rich text editor doesn't wo

[amibroker] Re: help in writing a formula

2009-02-16 Thread Mike
Grrr. Sorry, forgot that Yahoo's rich text editor doesn't work from Google's Chrome browser. What I intended to say was that the formula looks fine. It is helpful to add Plot statements to see what is going on. For example; I have modified your formula a bit for clarity, added Plot statements for

[amibroker] Re: help in writing a formula

2009-02-16 Thread Mike
--- In amibroker@yahoogroups.com, "Alan Nouray" wrote: > > Thank you Mike. This is what I wrote but when I do backtest, nothing > shows up. Is this correct? > > x=Foreign("X","C"); > YourSystemEntrySignal = Cross( EMA(x, 10), EMA(x, 20 ) ) AND x > > Ref(x,-50); > YourSystemExitSignal= Cross(EMA(x

[amibroker] Re: help in writing a formula

2009-02-15 Thread Alan Nouray
Thank you Mike. This is what I wrote but when I do backtest, nothing shows up. Is this correct? x=Foreign("X","C"); YourSystemEntrySignal = Cross( EMA(x, 10), EMA(x, 20 ) ) AND x > Ref(x,-50); YourSystemExitSignal= Cross(EMA(x, 20), EMA(x, 10)) AND x < Ref(x, -50); if( Name() == "A" ) { Buy = You

[amibroker] Re: help in writing a formula

2009-02-14 Thread Mike
You were not specific enough in your description for anyone to write the formula. Do you mean that the Cross happens in the EMA of "X", or of "A", or of "B"? In any event, the functions that you will need are as follows: 1a. Foreign http://www.amibroker.com/guide/afl/afl_view.php? name=foreign