The functions you are asking about are clearly documented in the user guide.

Cross: http://www.amibroker.com/guide/afl/afl_view.php?id=34
EMA: http://www.amibroker.com/guide/afl/afl_view.php?name=ema
MA: http://www.amibroker.com/guide/afl/afl_view.php?name=ma

To try multiple variations, run an Optimization:

http://www.amibroker.com/guide/h_optimization.html

Mike

P.S. You will need a much more sophisticated strategy than a single indicator 
before you find anything profitable.

--- In [email protected], "ford7k" <for...@...> wrote:
>
> hi afl experts
> 
> Can somebody give me afl code for above please
> 
> next can you give buy sell on profit sell on stoploss
> rules in code for backtest over 1 year eod data,please
> -----------------------
> what I tried so far
> 
> I tried RSI back test
>  with buy above 50,sell below50 as rules
> Result netloss
> I tried macd backtest with rules buy if macd cross signal and vice versa
> Result net loss
> 
> I LIKE TO TRY to backtest PRICE CROSS ABOVE OR BELOW EMA9
> 
> by backtesting can any gentleman tell me
> 
> ma cross ma5 and ma20
> ma cross 4 and 18
> ma cross ma10 and ma40
> 
> which of these is better if using one year eod data
> 
> can anybody give me code for the back test for these 
> 
> 
> regards
> thanks in advance
> ford
>


Reply via email to