Plot Buy/Sell signals on chart

#1
Hello!

I am a novice to Amibroker and using it for last few days. As of now I am using metastock and I understand that only. I have learnt that Amibroker is much better software and I have got the feel in last few days.

What I dont understand is about plotting an indicator/oscillator on the chart that can generate on screen signals in the shape of an arrow when price breakout of a moving average or a trend line etc.

I have seen a video http://www.amibroker.net/video/backtest.html and after back testing an AFL one has to command the program to display buy sell signals. I would like to know if its possible to display these arrows when a condition triggers on a continuous basis using a real time data?

I would request master users of the amibroker to suggest me the easiest way to the trick.

I would appreciate your efforts.

Regards,

MB Singh
 
#2
Hello!

I am a novice to Amibroker and using it for last few days. As of now I am using metastock and I understand that only. I have learnt that Amibroker is much better software and I have got the feel in last few days.

What I dont understand is about plotting an indicator/oscillator on the chart that can generate on screen signals in the shape of an arrow when price breakout of a moving average or a trend line etc.

I have seen a video http://www.amibroker.net/video/backtest.html and after back testing an AFL one has to command the program to display buy sell signals. I would like to know if its possible to display these arrows when a condition triggers on a continuous basis using a real time data?

I would request master users of the amibroker to suggest me the easiest way to the trick.

I would appreciate your efforts.

Regards,

MB Singh
Hello,

This AFL of Karthikmarar is an ideal one with all the required properties. It has got what you are looking for. I've highlighted it for your easy reference.

Praveen.

Code:
_SECTION_BEGIN("MABIUTS");
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 )) ));

Buy=EMA(C,13)>EMA(EMA(C,13),9) AND  Cross (C,Peak(C,5,1));
Sell=Cross (EMA(EMA(C,13),9),EMA(C,13));
MYcolor = IIf( EMA(C,13)>EMA(EMA(C,13),9) AND  C>Peak(C,2,1), colorGreen, IIf(EMA(C,13)>EMA(EMA(C,13),9) AND C<Peak(C,2,1),colorBlue, colorOrange ));

PlotOHLC( Open,  High,  Low,  Close, "", Mycolor, styleBar   ); 

[B][COLOR="Red"]shape = Buy * shapeUpArrow + Sell * shapeDownArrow;
PlotShapes( shape, IIf( Buy, colorGreen, colorRed ),0, IIf( Buy, Low, High ) );
[/COLOR][/B]
GraphXSpace = 5;
dist = 1.5*ATR(10); 

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

Thanks a million for instant response. I have just placed the AFL on the chart and the arrows were visible. Now I will take it further and experiment. My purpose is to choose Amibroker is that playing with indicators is probably easy and one can device custom indicators and keep experimenting till you find the right one, like one can play with moving averages and they dont work the same way on each stock as every stock has its own personality and need different treatment. Same way as an individual has different nature and should be handled accordingly.

Similarly I suppose that every indicator for a stock must have its own set of parameters otherwise it would not provide the result one may see in any other stock.

though the AFL you sent served the purpose very well but for the reason I just mentioned it provided the completely wrong output and if some one would have traded on them, must have lost on both the occasions.

My purpose is not to demean anyone by writing this but just wanted to suggest another way that once basic setups using patterns known in TA are visible like in the attached HCL Tech realtime 15 Min chart are visible one must ignore any other signals. See the chart and you would notice that an inverted H&S breakout provided first buying opportunity and later a flag breakout provided another one.
regards,


M.B. Singh
www.technicaltradersofindia.com
 

Attachments

#4
Dear Praveen!

Thanks a million for instant response. I have just placed the AFL on the chart and the arrows were visible.

....
....

though the AFL you sent served the purpose very well but for the reason I just mentioned it provided the completely wrong output and if some one would have traded on them, must have lost on both the occasions.
Hi,

I posted that AFL to show you the real time application of plotting buy/sell arrows, which was what you'd asked.

Of course there are many types of trading - Pattern trading, indicator trading, etc.

There are lots of dedicated threads that deals with the above types of trading.

As a matter of fact, the AFL which was posted earlier is getting discussed in depth in Karthikmarar's thread - Experiments in TA.

Praveen.
 

vijbala

Active Member
#5
Mr praveen,
Pls tell me how to use your programme to get buy-sell signal in Amibroker charts. I am not a technical person
Thank you
 
#8
Mr praveen,
Pls tell me how to use your programme to get buy-sell signal in Amibroker charts. I am not a technical person
Thank you
Hi,

Extremely sorry for the late reply. Didn't notice your post.

Which program are you referring?

The AFL posted belongs to this forum member, Karthikmarar.

Are you asking about Amibroker? If so please refer to the posted code, or even better refer Amibroker User Guide.

Praveen.
 

chintan786

Well-Known Member
#9
Hi,

Extremely sorry for the late reply. Didn't notice your post.

Which program are you referring?

The AFL posted belongs to this forum member, Karthikmarar.

Are you asking about Amibroker? If so please refer to the posted code, or even better refer Amibroker User Guide.

Praveen.
Hi praveen, from last 2 days I am trying to write buy on Up Green arrow and Sell on Red Arrow.

But not getting desired results.

Buy signal not come exactly at same point. It is always come one or day ahead.

What I do?

Can u plz me out.

thanks in advance
 
Last edited:
U

uasish

Guest
#10
Dear Praveen!

Thanks a million for instant response. I have just placed the AFL on the chart and the arrows were visible. Now I will take it further and experiment. My purpose is to choose Amibroker is that playing with indicators is probably easy and one can device custom indicators and keep experimenting till you find the right one, like one can play with moving averages and they dont work the same way on each stock as every stock has its own personality and need different treatment. Same way as an individual has different nature and should be handled accordingly.

Similarly I suppose that every indicator for a stock must have its own set of parameters otherwise it would not provide the result one may see in any other stock.

though the AFL you sent served the purpose very well but for the reason I just mentioned it provided the completely wrong output and if some one would have traded on them, must have lost on both the occasions.

My purpose is not to demean anyone by writing this but just wanted to suggest another way that once basic setups using patterns known in TA are visible like in the attached HCL Tech realtime 15 Min chart are visible one must ignore any other signals. See the chart and you would notice that an inverted H&S breakout provided first buying opportunity and later a flag breakout provided another one.
regards,


M.B. Singh
www.technicaltradersofindia.com
M B Singh,
In your intraday chart of (13th April) of HCL Tech you have mentioned Kartick's Mabiuts is giving wrong signals.From my attached chart of EOD you will find in fact his Mabiuts has given Buy signal.May be for Intraday he might suggest a change,but it is perfectly OK in EOD.
Asish
 
Last edited by a moderator:

Similar threads