AmiBroker formula Language

gsm

New Member
Hi
Help neaded to code to plot moving average line as a horizontal line, and Price bars are then repositioned along this line depending on their relation to the moving average line. To see cycles visualy.
Thanks
 

rds

New Member
Hi everybody,

I' m a newbie to Amibroker and need some help. I've put together some code to give Buy/Sell signals using the usual EMA crossover.

What I'm having a problem with is the ATR based Trailing stop loss. In a long trade, I want it to keep rising and in a short trade to keep falling. Instead, it goes up and down based on the variation of the ATR.

Is it possible to make it so that, in a long trade the SL will only keep rising, and in a short trade it will only keep falling. Here's the code with my comments. Please let me know if you have any suggestions.

Thanks very much
Ramesh

-------
 
Last edited:

Sunny1

Well-Known Member
Is it possible to make our own moving average in amibroker

MA in amibroker has some caculation like xyz/abc --->want to raplace it with my own calculation and then plot it
 

murthymsr

Well-Known Member
Is it possible to make our own moving average in amibroker

MA in amibroker has some caculation like xyz/abc --->want to raplace it with my own calculation and then plot it
hi sunny,

MA calculates the average of the last n values. Other variants are EMA WMA etc.

Yes, you can use any other formula also using the basic variables namely OHLCV or calculated variables like MA, EMA, MACD etc. and using any of the mathematical operators like +-*/ etc.

But when the time tested indicators are readily available, why take all the trouble, unless one's interest is research and not trading?

Anyway, all the best.

murthymsr
 

Sunny1

Well-Known Member
hi sunny,

MA calculates the average of the last n values. Other variants are EMA WMA etc.

Yes, you can use any other formula also using the basic variables namely OHLCV or calculated variables like MA, EMA, MACD etc. and using any of the mathematical operators like +-*/ etc.

But when the time tested indicators are readily available, why take all the trouble, unless one's interest is research and not trading?

Anyway, all the best.

murthymsr
Thanks but I got it what I wanted. needed for observation only. I like to do researches.
 
Hi all

Can anyone help me to write AFL for following

I want to find out the stocks whose close is exactly same as its any previous close. For example if a XYZ stock has closed on 289 Rs. I want to find out on which day previously it has closed exactly on 289 Rs.

Thanx in advance.

Prashant
 
Hi all,
I am a newbie to amibroker and a non programmer.Till now I was using 5EMA and 20EMA crossover alongwith stochs,rsi in yahoo charts for doing trades.I wud be grateful if someone can tell me if there is any AFL available with buy/sell signals with above crossovers/settings incorporated.
Though AFL Library speaks of SEykota EMA crossover,But i am not sure if its the same i am talking off.
Looking for Help from AfL geniuses.
thx
sandy
 

Similar threads