A rising market can briefly fall below its fast moving average without ending its broader trend. Entering during the dip may be premature; waiting for a confirmed reclaim may reduce that ambiguity, at the cost of a later entry. This MultiCharts .NET research strategy makes that trade-off explicit.
What you will learn
- Define a completed-bar EMA reclaim within a rising slow trend.
- Separate entry confirmation from protective exits and position sizing.
- Integrate a C# signal helper into the MultiCharts .NET signal lifecycle.
- Test whipsaws, gaps and order-state failures.
Rules and example
Use a 20-period EMA as the fast reference and a 100-period EMA as the slow trend reference. Require the slow EMA to exceed its value five completed bars earlier. A long signal occurs when the previous close is at or below its own fast EMA and the current completed close is strictly above its own fast EMA. Only enter while flat, with no pending entry. Request a next-bar market order; never assume the signal close is the fill.
For illustration, round the fast EMA to 100 on both bars. A previous close of 98 and current close of 101 satisfy the reclaim condition. If the slow EMA rises from 95 to 96 over five bars, the trend condition also passes. A next-bar fill of 102 is possible, not guaranteed.

Hypothetical closing prices around a rounded fast EMA reference; the slow trend filter is not plotted.
C# implementation
// Pure signal helper; call once per completed bar.
private bool Reclaim(double c0, double c1,
double ema0, double ema1, double slow0, double slow5)
{
return slow0 > slow5 && c1 <= ema1 && c0 > ema0;
}
This is a pure decision helper, not a complete SignalObject. In the PowerLanguage .NET editor, create a signal, initialize EMA calculations using the installed indicator functions or a consistently seeded recursive EMA, and evaluate in CalcBar on completed bars with intrabar order generation disabled. Supply current and previous completed closes and their corresponding fast EMA values; slow5 is the slow EMA five bars before slow0. Require sufficient warm-up history, preferably several slow EMA lengths. Create the entry order object during the signal initialization lifecycle using the installed API's next-bar market order facility and submit only when the helper returns true and the strategy is flat. Consult the installed PowerLanguage .NET Help for version-specific order and position APIs. Track outstanding orders and reconcile broker positions rather than treating submission as execution.
Risk and exits
For a research example, place a protective stop 1.5 ATR(14) below the actual entry fill, with ATR frozen at signal close, and a target 3 ATR above the fill. If ATR is 2 and fill is 102, stop is 99 and target is 108 before tick rounding. Size by cash risk divided by stop distance times point value, rounding down to valid quantity; skip if minimum quantity exceeds budget. Account for costs, gaps and slippage. Also exit next bar if a completed close falls below the fast EMA. Coordinate protective and discretionary exits so that a second exit cannot reverse the position. Validate broker-side protection and partial fills.
Testing
Compare against the same reclaim strategy without the slow slope filter, keeping costs and exits fixed. Measure trade count, net return, drawdown and adverse excursion. Test equal closes, flat slow EMA, warm-up, gaps, both protective levels touched in one bar, and repeated signals while an order is pending. Use realistic intrabar fill assumptions and out-of-sample data. The helper is uncompiled and unbacktested; no profitability is established. Trading can cause substantial losses.
For custom signal integration and order management, see Custom MultiCharts .NET strategy Development Services.