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

Lavoro terminato

Tempo di esecuzione 2 ore
Feedback del cliente
Very good job. Very engaged!
Feedback del dipendente
Very thanks for order! Please let me know if you need programmer.

Specifiche

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












































Con risposta

1
Sviluppatore 1
Valutazioni
(1156)
Progetti
1462
63%
Arbitraggio
21
57% / 10%
In ritardo
43
3%
Gratuito
2
Sviluppatore 2
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
Ordini simili
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
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
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 Overview I am looking for an experienced MT5 (MQL5) developer to modify an existing Account Protection EA and, if required, extend it with custom logic. This is NOT a strategy or trading EA . The EA is purely for risk management, drawdown protection, alerts, and trading lock , suitable for prop-firm and managed accounts . Core Requirements 1. Alerts & Monitoring Alert on trade entry and trade exit Alert when
I’m looking for an experienced MQL5 developer to build TWO MT5 custom indicators that detect multi-condition M30 trade setups and send Telegram alerts before trade execution . This project requires strict close-based logic , multi-indicator buffer processing , and non-repainting behavior . HIGH-LEVEL REQUIREMENTS Indicators must evaluate signals from M30 only All conditions are checked only after candle close Logic
1. The idea of the trading system is as follows : market entries are performed when MACD's main and signal lines intersect in the current trend direction . 2. Trend is determined based on the Exponential Moving Average with the specified period (InpMATrendPeriod). If the current EMA value is greater than the previous one, the trend is seen as growing (ema_current > ema_previous). Alternatively, if current EMA is
Tôi muốn EA siêu lợi nhuận, giá cả không thành vấn đề, chỉ cần bạn có thể chứng minh được, và gửi tôi bản demo để tôi kiểm tra bạn hãy chứng minh bản thân mình trước. EA cần backtest 1 năm hoạt động ổn định

Informazioni sul progetto

Budget
30+ USD