Provide AFL to Sort Ambroker analysis output by date and place into a watchlist:
I currently Run an Amibroker Analysis for about 12 separate conditions, each goes into its own separate watchlist. But currently the analysis output comes in alphabetical order- I need the output for each condition sorted into date order before it is added to or replaces its existing watchlist.
I do not want to run each condition manually and click the date column header, I need it done automatically by the AFL for all conditions.
STEPS as I See It
1. Options: Set in the Parameter Box?
- Select how many bars to look back: i.e. last x bars
- Select: Add or Replace watchlist with new sorted list
2. RUN AFL ANALYSIS
Code Outline
- buy = condition1 for last x bars: produces Analysis Output
- sort Analysis Output on date (earliest to most recent)
- add or replace sorted List (as per parameter selection) to existing watchlist1
Continue for each subsequent condition2, condition3, condition4 etc
- buy = condition2 for last x bars
- sort Analysis Output on date (earliest to most recent)
- add or replace sorted list (as per parameter selection) to existing watchlist2 etc