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..
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..