Hello All,
My purpose is to restrict and get only first 3 results from exploration whenever it is run.
Could you please guide me which parameters can help me with it
Reading about AddSummaryRows( 16, 1.2 ); which gives the count, however how can a restriction if the value is > 3 then the exploration stops there it self be imposed.
In this example only first 3 results should have been printed
No, what you say is incorrect (besides your Buy is unknown).
Anyway that code I've posted does not show all signals!
It shows n-most recent TRUE PER SYMBOL!
And BTW please do not remove original description and link from code you have not come up with yourself. I consider it disrespectful.
Buy = C > MA(C, 20);
Filter = Buy;// add your initial filter here
/// output n-recent true filter occurrences PER SYMBOL!
/// @link https://forum.amibroker.com/t/limit-exploration-results-to-a-count/12622/5
n = 5;// set N most recent filter occurrences
cum_filt = Cum(Filter);
Filter = Filter AND cum_filt >= LastValue(cum_filt)-n+1;
SetSortColumns(1, -2);
AddColumn(cum_filt, "Cum(Filter) old", 1 );
AddColumn(Cum(Filter), "Cum(Filter) new", 1 );
AddColumn(O, "Open", 1.4 );
AddColumn(C, "Close", 1.4 );
I don't have any intention to disrespect you. You always help us to learn AFL in correct way. Actually for description and link ,I clearly wrote code provided by you.
There was a misunderstanding from my side with this result, when tested.
I thought it will restrict the number of signal generated from the strategy for MULTIPLE SYMBOL.
In future corresponds i will be much more careful about the original description and link.
Please accept my sincere apologies for the unintentional removing original description and link from code.