Home System Trading Post

Maximize Your Trading with Burg Extrapolator for MetaTrader 5

Attachments
19046.zip (4.91 KB, Download 0 times)

Creator of the Idea: Vladimir, mq5 Code Author: barabashkakvn.

If you're looking to give your trading strategy a boost, the Burg Extrapolator might just be the tool you need. This Expert Advisor leverages Burg's method for linear prediction, which essentially forecasts future prices based on historical data. In simple terms, it analyzes the price range from x[0]..x[n-1], where the higher index represents more recent prices, to predict x[n], the future price. The calculation looks something like this:

x[n] = -Sum(a[i]*x[n-i], i=1..p)

Here, a[i=1..p] are model coefficients, and p refers to the model order. The beauty of Burg's method is that it fine-tunes these coefficients by minimizing the mean-square error over the last n-p bars.


Input Parameters

  • MaxRisk - Sets the maximum risk for all open trades.
  • ntmax - Limits the maximum number of trades in one direction.
  • MinProfit - The minimum predicted profit required to open positions.
  • MaxLoss - The maximum predicted loss at which trades will be closed.
  • TakeProfit - The target profit level.
  • StopLoss - The stop-loss threshold.
  • TrailingStop - Activates the Trailing Stop feature.
  • PastBars - Number of previous bars used for future predictions.
  • ModelOrder - Order of Burg's model as a fraction of past bars (0..1).
  • UseMOM - Enables detrending using momentum: mom(i)=log[p(i)/p(i-1)].
  • UseROC - Enables detrending using rate of change: roc=100*(p(i)/p(i-1)-1).

Keep in mind that only one of the UseMOM and UseROC parameters can be true at any given time; setting both to true is a no-go.

As with most optimized Expert Advisors, the Burg Extrapolator shines when working with training bars. Without regular re-optimization, you might find it struggling to keep up with market changes and potentially losing money.

Related Posts

Comments (0)