Skip to content
All library documents

Color-Coded Moving-Average Trend Signals with Loss-Responsive Position Sizing

Article ProRealCode

Summary

This Expert Advisor uses a ColorXPWMA_Digit indicator to identify trend changes from changes in the indicator line's color. Signals are evaluated at bar close. Position size is adjusted separately for buys and sells based on recent outcomes in the same direction: after a configured number of losses within a sample of recent trades, the next trade uses a smaller volume; otherwise it uses the normal volume. The example settings compare the last five trades and reduce size when three are losses, using 0.01 lots instead of 0.1 lots.

The document mentions default stop settings and presents a GBPJPY hourly test for 2017, but supplies no numerical performance measures or detailed evaluation of the results. It also requires the compiled indicator file to be present in the platform's indicator folder. No broader validation, transaction-cost analysis, or evidence across other instruments and periods is provided, so the approach's effectiveness and risk behavior remain uncertain.

Key ideas

  • The system enters on a trend change indicated by the color of an indicator line at bar close.\nBuy and sell positions are sized using separate histories of recent trades in each direction.\nThe example reduces the next position to 0.01 lots after three losses among the latest five trades.\nA GBPJPY hourly test for 2017 is referenced, but detailed performance metrics are absent.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.