Building a strategy
There are two ways to build a strategy with Aphna: by hand, or with the search tool doing the repetitive part. Both end in the same place: a strategy that meets Aphna's standards. Work at your own pace.
Before you touch a setting
- Change one thing at a time. Change two at once and you'll never know which one did the work.
- Build on the IS lines. Compare them with the "needed: IS" targets (guide 2). Leave OOS alone until the end.
- If a strategy fails, bin it. Never adjust settings until OOS passes. That turns your only unseen test into more fitting.
Learn one symbol first
Start with one symbol and learn how it behaves: when it moves, how far, how it reacts to news. A strategy built by someone who knows the symbol beats six strategies spread thinly across six symbols.
What "better" means
Every step asks the same question: did this change make the strategy better? It's a balancing act between profit and drawdown.
- Entry and exit settings: pull drawdown down as far as you can, while keeping profit as high as you can.
- Filter settings: keep pushing profit up, and bring the consecutive wins and losses into line. Drawdown may rise slightly, 0.1 to 1, if that's what it takes.
Keep the trade count and the consecutive wins and losses in mind throughout, and watch them closely once you reach the filters.
Method 1: by hand
This is the suggested method, building by hand.
Before you begin: use the search tool's Timeframes search to check which chart timeframe suits the strategy (guide 4).
Entry and exit settings
1. Direction and Entry Candle. Try Both, Long and Short, each with every Entry Candle option. Keep the combination with the best drawdown and profit.
2. Stop Loss. Start at 1 and step upwards. Steps of 1 first, then 0.1, then 0.01 as you get closer to the drawdown you want.
3. Take Profit. Start at 1 and step upwards, with the same steps as the stop.
4. MA 1. Sweep from 2 up to 5 above the current value.
5. MA 2. Steps of 5, three steps below and three above the current value. Where it improves, refine in steps of 1.
6. Stop Loss and Take Profit again. Three steps below and three above their current values.
The loop: every time a change improves the strategy, go back to MA 1 and work down the list again. The entry and exit settings are finished when a full pass improves nothing.
Filter settings
When changing any of these settings improves the strategy, go back to MA 1 and do the loop again.
7. Cool-down. Steps of 1, then 0.1.
8. Structure Filter, then Timeframe Filter, then Signal Filter. One at a time.
9. Trend Strength Min and Max. These stay on the Suggested values until now, and you only move them if the figures are stubborn. This is where the search tool earns its keep (guide 4).
10. Sessions and days, last. Go through each session's days. Remove days that lose, or barely make anything, and check whether the strategy improves.
Keep going until the strategy meets the criteria. If it can't, start a new one.
Method 2: with the search tool
The same destination, with Aphna Search doing the repetitive testing. It needs TradingView in Chrome (guide 4). Every figure the search shows is an IS figure, so compare with the "needed: IS" targets.
1. Set the basics by hand. Direction, Entry Candle and a Take Profit of 1 or more. Leave Trend Strength on the Suggested values.
2. A broad search. Run a Random search of 200–300 settings across wide ranges of MA 1 and MA 2 together. Keep the minimum IS trades filter from the builder, but leave the maximum drawdown filter loose (10, say). At this stage you're looking for promising areas, not finished strategies. Sort by drawdown, then look at profit.
3. Judge the best rows properly. For each promising row, click it to load it and check the Data Window: is the profit spread across the months, or does it come from one? A row with good totals built on one huge month is a poor result.
4. Nothing good? Change the Take Profit, or the Stop Loss, and run the broad search again.
5. Test the neighbours. With a good starting point loaded, try each setting two steps either side by hand. MA 1 of 15: try 13, 14, 16 and 17. Stop Loss of 1.5: try 1.3, 1.4, 1.6 and 1.7. A strong setting has strong neighbours; one that only works at a single exact value is usually luck.
6. Narrow searches around what you have. Random searches in small steps, close to the current values:
- Stop Loss and Take Profit first, in steps of 0.01;
- then Trend Strength Min and Max;
- then MA 1 and MA 2. Moving averages are whole numbers: use a step of 1, never 0.1.
7. Fine-tune Trend Strength. A Sequential search on Trend Strength Min, then on Max, in small steps around the current values.
8. Finish with the filter settings exactly as in Method 1: cool-down, the three filters, then sessions and days, going back to check the entry and exit settings whenever something improves.
Remember: the best row out of 300 is often the best row by luck. That's why steps 3 and 5 matter: they check the result is solid, not lucky.
When you've finished
Check the three stages in guide 2:
- IS passes 7/7.
- OOS passes: 5/7 or better, profitable, drawdown under 3%. Look once.
- Key stats meet the full criteria: 52–90 trades, 30%+ profit (40% the aim), drawdown under 3%, 70%+ wins, consecutive wins at least 4× losses, no more than 3 losses in a row.
Then go to guide 5: Going live.