AmiBroker formula Language

#71
hi Praveen,

Thanks a lot for the code.The codes are basically used in swing trading. Kindly refer book swing trading by larry swing.

Regards:)
 
#72
hi Praveen,

Thanks a lot for the code.The codes are basically used in swing trading. Kindly refer book swing trading by larry swing.

Regards:)
Hey Ume,

Check the code, ie., test/run the code. I doubt over either its logic or the presentation of the BUY conditions.

Praveen.
 
#73
Dear praveen,

Thx for the reply, but i have not been able to find the AFL till now.

If u can provide, that will be of great help.

regards,

Sunil

Originally Posted by sunilhv0
Hi all,

I need help in writting an AFL if possible, where these signals are generated:

Buy signal is generated when
MA 4 < MA17 < EMA34
and MACD is positive and RSI above 50
Sell signal is generated when
MA 4 > MA17 > EMA34
and MACD is negative and RSI below 40

MA is moving average
EMA Exponential Moving average

thx in advance,

with regards,

Sunil


Hi Sunil,

Sorry for the late reply.

I hope you might have got the AFL. If not, let us know, we will provide it.

Praveen.
 
#74
Dear Mr Praveen,
I am new to this thread, First of all i appriciate your contribution to amibroker users, Congrats - keep on doing.
I need your help
1. I would like to plot a buy sell indicator for EMA crossover of EMA 50 & 200 with arrows and rates display. I tried from http://www.amibroker.com/guide/afl/ but it didnt gave any signals. I also want to back test the same with 10 min chart, pls guide.
2. I need buy sell signals for ADX.
Thanks in advance
Raj
 
#75
Dear praveen,

Thx for the reply, but i have not been able to find the AFL till now.

If u can provide, that will be of great help.

regards,
Hi,

I'm really sorry again for the late reply.

Here is its AFL:

Buy = (MA(C,4) < MA(C, 17) < EMA(C, 34)) AND MACD() > 0 AND RSI() > 50;
Sell = (MA(C,4) > MA(C, 17) > EMA(C, 34)) AND MACD() < 0 AND RSI() < 40;

Regards,
Praveen.
 
#76
....
I am new to this thread, First of all i appriciate your contribution to amibroker users, Congrats - keep on doing.
...
Thanks.


I need your help
1. I would like to plot a buy sell indicator for EMA crossover of EMA 50 & 200 with arrows and rates display. I tried from http://www.amibroker.com/guide/afl/ but it didnt gave any signals.
Here is the AFL:

Period1 = Param("ShortPeriod", 50, 2, 200,1);
Period2 = Param("LongPeriod", 200, 2, 200,1);

Buy = Cross( EMA(C, Period1), EMA(C, Period2));
Sell = Cross( EMA(C, Period2), EMA(C, Period1));

dist = 1.5*ATR(10);

for( i = 0; i < BarCount; i++ )
{
if( Buy ) PlotText( "Buy\n@" + C[ i ], i, L[ i ]-dist, colorGreen );
if( Sell ) PlotText( "Sell\n@" + C[ i ], i, H[ i ]+dist, colorRed, colorYellow );
}

PlotShapes( Buy * shapeUpArrow + Sell * shapeDownArrow, IIf( Buy, colorGreen, colorRed ) );



I also want to back test the same with 10 min chart, pls guide.
Please check the first post in the thread :"Amibroker: Links, Discussions and more" thread. That has the link for the thread that explains the procedure for backtest.


2. I need buy sell signals for ADX.
Please give more details. Information given is not sufficient.

Regards,
Praveen.
 
#77
Dear Praveen
Thanks a lot, It was nice i added "plot" to the EMA lndicator and working well.
Regarding backtest i could not get ur correct link, please provide here.

I need some more clarification in amibroker, even if these questions may be basic, please guide me,
1) For intraday signals for MACD and RSI kindly suggest the time period that works out well (particularly for nifty trades )
2) what is ur suggesion on EMA crossover indicators for indraday trades (again for nifty)

Thanks in advance.

Raj
 
#78
Thanks a lot, It was nice i added "plot" to the EMA lndicator and working well.
Glad to hear it.

Regarding backtest i could not get ur correct link, please provide here.
The best source where you can learn about Backtesting is Amibroker User Guide. I went through others too, but Users Guide is THE best. Backtesting is discussed under the heading "Back−testing your trading ideas", the Page. no. falls around 119. Check it out there.

It explains each and every bit of backtesting, with well defined examples.

I need some more clarification in amibroker, even if these questions may be basic, please guide me,
1) For intraday signals for MACD and RSI kindly suggest the time period that works out well (particularly for nifty trades )
2) what is ur suggesion on EMA crossover indicators for indraday trades (again for nifty)
My knowledge on indicators is next to nothing. Please consult the seniors who are good in indicators like Karthikmarar, etc.

Regards,
Praveen.
 

swagat86

Active Member
#79
Hi frnds,

I dont hav much idea of AFL's. In metastock we change the colour od the bars as in, if the stcok has closed up for the day the bar is green and if its closed down bar is red. Is it possible to do so in Amibroker too. I know that CAndle colors can be changed thru the preference panel. But how about bars. I think there has to be an AFL for that.

If so pls can some one tell. If there is any other method still pls do tell me.



Thnaks In Advance
 
#80
Hi frnds,

I dont hav much idea of AFL's. In metastock we change the colour od the bars as in, if the stcok has closed up for the day the bar is green and if its closed down bar is red. Is it possible to do so in Amibroker too. I know that CAndle colors can be changed thru the preference panel. But how about bars. I think there has to be an AFL for that.

If so pls can some one tell. If there is any other method still pls do tell me.

Thnaks In Advance
Here is the required AFL:

Code:
_SECTION_BEGIN("BarChart");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) Vol " +WriteVal( V, 1.0 ) +" {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 )) ));
UpColor = ParamColor("UpColor", colorBrightGreen);
DownColor = ParamColor("DownColor", colorRed);
MyColour = IIf(C >= O, UpColor, DownColor);
PlotOHLC(O,H,L,C,"Price", MyColour, styleBar);
Plot( Volume, _DEFAULT_NAME(), IIf(C>O, ParamColor("UpVolume", colorBlue), ParamColor("DownVolume", colorViolet)), ParamStyle( "Style", styleHistogram | styleOwnScale | styleThick, maskHistogram  ), 2 );
_SECTION_END();
Praveen.
 

Similar threads