Counting the number of signals

murthyavr

Well-Known Member
#1
This is a sample code to generate Buy/Sell signals basing on crossing of EMA(13).

Buy=Cross(C,EMA(C,13));
Cup=IIf(Buy,1,0);
Sell=Cross(EMA(C,13),C);
Cdn=IIf(Sell,1,0);

Filter=Buy OR Sell;
AddColumn(Cup,"Up",1);
AddColumn(Cdn,"Dn",1);

And the above program assigns 1 for each Buy/Sell.

Upon exploration on intraday data, the results window gives the details of each scrip, whenever a Buy or Sell is triggered. So, a scrip can have more than one entry in the results window.

Now, I want the above data to be summarized and require the results window to show the name of the scrip, total number of Buy signals and the total number of Sell signals.
As such, I want only one SUMMARIZED record per scrip.

Can someone kindly guide me on the above?

Thanks in advance..
 

murthyavr

Well-Known Member
#3
OK..

Since there were no replies, I had to go the Excel way (which I wanted to avoid, and do in Amibroker itself) and get the results.

A simple Excel macro would import the contents of the file generated through Automatic Analysis and will sort out things with a Pivot Table.

A long route..!
 

Similar threads