Buy Setup in AmiBroker

#1
Hello Everyone,
I am very new to Technical analysis and AmiBroker as well. Just I learned few things from Saint's post and wanted to setup the Buy Signal through AmiBroker. I have following questions and Could any one of you help me out?

1. I would like to compare the last 4 days data and raise buy signal? How can I do that?

2. I want watch all F&O stocks prices automatically by Amibroker instead we open the chart and see it. The application has to check automatically.

I am not sure this all can be done or not. I need the startup. because i am not aware of how to start.

Any help would be reaaly appreciated and thanks much in advance.

Thanks
Bala
 
#3
To begin with let us say you wish to check if price is moving higher in the last four days. Amibroker formula for this is as follows in condition1. condition2 is similar formula for the downside.


//begin
//strategy formula

condition1=c>ref(C,-1) and ref(c,-1)>ref(c,-2) and ref(c,-2)>ref(c,-3);
condition2=c<ref(C,-1) and ref(c,-1)<ref(c,-2) and ref(c,-2)<ref(c,-3);

Buy= Condition1;
Sell= Condition2;

//Plot the conditions on the chart

PlotShapes( condition1 * shapeUpArrow, colorGreen, 0, L, -20 );
PlotShapes( condition2 * shapeDownArrow, colorRed, 0, H, -20 );

//end


When you run "SCAN" , the Buy and Sell conditions for the day will be displayed.

Hope my explanation is good enough for you.

Kaleem
 
#4
Thank you so much for your reply. Also you said when you scan the results will be displayed. But it should run automatically and wanted to alert me when price goes up or down.. What shall i do for this?

"When you run "SCAN" , the Buy and Sell conditions for the day will be displayed"


One second thanks much and your help would be really appreciated
 

kaly422000

Well-Known Member
#5
To begin with let us say you wish to check if price is moving higher in the last four days. Amibroker formula for this is as follows in condition1. condition2 is similar formula for the downside.


//begin
//strategy formula

condition1=c>ref(C,-1) and ref(c,-1)>ref(c,-2) and ref(c,-2)>ref(c,-3);
condition2=c<ref(C,-1) and ref(c,-1)<ref(c,-2) and ref(c,-2)<ref(c,-3);

Buy= Condition1;
Sell= Condition2;

//Plot the conditions on the chart

PlotShapes( condition1 * shapeUpArrow, colorGreen, 0, L, -20 );
PlotShapes( condition2 * shapeDownArrow, colorRed, 0, H, -20 );

//end


When you run "SCAN" , the Buy and Sell conditions for the day will be displayed.

Hope my explanation is good enough for you.

Kaleem
i know little about afl coding . will this afl work
 
#7
Hello Sir,

I want a AFL for a Price alert...It should email me if a stock price goes up or below the specified level. Could you please help me..i have been searching all over internet and could not find one..

Thanks
Vinodh
 

Similar threads