Solve this problem: Calculated Moving average mode SMMA different in strategy tester visualization compared to normal chart

Job finished

Execution time 2 hours
Feedback from customer
Very good job. Very engaged!
Feedback from employee
Very thanks for order! Please let me know if you need programmer.

Specification

I found out that the calculated moving average (mode SMMA) is different vom the same moving average in the normal chart window.

The consequence is a wrong behavour of the EA.

Let's take this small "EA" to show the problem:

void OnTick()
  {
      // Create an array
      double myMovingAverageArray[];
      
      // define properties of moving average
      int MovingAverageDefinition = iMA (_Symbol, _Period, 400, 0, MODE_SMMA, PRICE_CLOSE);
      
      // sort the price array downwards
      ArraySetAsSeries (myMovingAverageArray, true);
      
      // Copy values
      CopyBuffer (MovingAverageDefinition, 0, 0, 3, myMovingAverageArray);
      
      // Calculate moving average for the current candle
      double myMovingAverageValue = myMovingAverageArray[0];
      
      // Print the value on chart
      Comment ("myMovingAverageValue: ", myMovingAverageValue);
   
  }


The EA is working with the dow jones index and has the following settings:

EA settings


This is the standard chart with the moving average (black line):

Standard Chart Window

This is the settings of the moving average:


I saved exactly this chart as template "tester.tpl".

Then I start the EA.

Result:

As you can see, the values for the moving average on the "standard chart" is different from the moving average produced by the tester:

Date Mode Value Standard Chart Value Tester
28.12.2018 SMMA 22107 23459


What I also found out:

- The problem only appears in the "SMMA" mode. If I use the "SMA" mode, then there is no difference between normal chart and tester.

- If I rise the number of periods from 400 to 600 (in mode "SMMA") then the moving average does not appear at all in tester.


Job: Fix this problem by

- modifying the small EA (see above) OR

- create an indicator

The Job is done when the correct values (= same values as in the normal chart) of the SMMA 400 are available in strategy tester / mql5 code for further calculations












































Responded

1
Developer 1
Rating
(1156)
Projects
1462
63%
Arbitration
21
57% / 10%
Overdue
43
3%
Free
2
Developer 2
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
Similar orders
Signal Logic - Swing points detected correctly (Fractals or N-bar) - BOS triggers only on bar close beyond swing level (+ optional min break distance) - FVG zones detected correctly (3-candle gap) and stored with clear boundaries - FVG invalidation works as configured (full fill / partial fill / timeout) Entry & Execution - Entry only after BOS (if enabled) and on return to active FVG zone - Bar-close confirmation
Hi, I’m searching for a developer who already has a high‑performance Gold EA that can beat the results shown in my screenshot. If you have such an EA, please reply with: - A brief description of how it works (grid, scalping, SMC, etc.) - Backtest results and the set files you used - Whether you’re willing to make minor tweaks so I can use it as my own If the performance looks good, we can discuss adjustments and next
Multi-Asset AI Trading Bot Details Proposals I want a single, cohesive AI bot that can log in to MetaTrader, Coinbase, Robinhood, and TradingView, scan live market data, and execute trades automatically in stocks, forex, and crypto. The core logic must support day-trading, swing-trading, and scalping modes that I can toggle on a schedule or by simple configuration. The workflow I picture is: • Real-time data
I need someone that is able to develop for me a MT5 EA that perform VERY WELL on XAUUSD. Every strategy is accepted. By applying, please send me screenshot of results since 2018
Hello developers, I'm looking for existing, proven EAs (MQL5) that work flawlessly on MT5. Requirements: Demo version available for testing Backtest results + screenshots Verified trade history from 2018-2025 Budget is negotiable If you've got an EA that fits, hit me up
Need a HFT scalping EA 30 - 100 USD
Require the development of a high-speed HFT, fully automated trading Expert Advisor (EA) for MetaTrader 5 , optimized for live trading on both Deriv and Exness . The EA must be designed for fast execution, low latency, and reliability on real-money accounts , with full compatibility across broker-specific contract specifications, tick sizes, tick values, pricing formats, and volume rules. It should automatically
Looking for an experienced MQL4/MQL5 developer. Task: EX4 → MQ4 recovery Modify EA logic Convert MQ4 → MQ5 (fully working) Must understand MT4 vs MT5 differences and deliver clean, tested code. This is a paid job, with possible follow-up work if things go well. DM me with your experience and examples of similar work
This EA uses the inbuilt indicators to execute trades. It follows the simple rules of buy signal and sell signal.It will be independent of each other. The same rule follows for each
1. Background & MQL5 Journey: ¿Cuéntame un poco sobre tu background en trading algorítmico y qué te emociona de crear EAs de alto rendimiento? 2. Experience: ¿Cuáles son 2-3 EAs destacados que has creado (mercados, Sharpe, PF, señales/backtests)? 3. Institutional Results: ¿Puedes lograr Sharpe ≥3.0, PF >2.5, <10% DD en XAUUSD? ¿Qué te da confianza? 4. Demo EA: ¿Tienes una señal de EA top (MQL5/Myfxbook) con 100+
Here's the TradeStation ELD files that i want to convert to tradingview pine script (unprotected so you can see codes for indicators and systems/strategies) - let me know what you think it would cost? thanks i will be looking for great developer that will bid it for it and get started

Project information

Budget
30+ USD