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

Trabajo finalizado

Plazo de ejecución 2 horas
Comentario del Cliente
Very good job. Very engaged!
Comentario del Ejecutor
Very thanks for order! Please let me know if you need programmer.

Tarea técnica

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












































Han respondido

1
Desarrollador 1
Evaluación
(1123)
Proyectos
1425
62%
Arbitraje
21
57% / 10%
Caducado
43
3%
Libre
2
Desarrollador 2
Evaluación
Proyectos
0
0%
Arbitraje
0
Caducado
0
Libre
Solicitudes similares
***** THIS IS FOR MT5 ***** The indicator now makes 5 lines and I use it on US30 It is for NY session and has inputs for times - open and close It creates lines at NY open NY open line 100 point 200 points I want to add 300 pt lines and 400 point lines I want On/off box added for dotted or dashed 50 - 150 - 250 and 350 lines I want alerts when the candles reach the 100 - 200 ect...lines but would love "Push
Job Title: MQL5 Trading Bot Code Debugging and Optimization** **Description:** We are seeking an experienced MQL5 developer proficient in debugging and optimizing trading bot codes. The current project involves fixing existing code that runs into debugging issues without errors and optimizing it for efficient performance in live trading environments. **Responsibilities:** - Debug existing MQL5 trading bot code to
Active expert 250+ USD
hi, I must do changes to a dashboard with manual input of trader and active expert. Budget 250$ Can do? the budget is correct based on job to do. If you want me to increase the budget you can message me
HELLO DEAR DEV'S. I'VE AN EA BUT IT STOP WORKING WHEN MT4 HAS BEEN UPDATED TO THE LATEST VERSION (1420). SO I NEED A GOOD DEVELOPPER THAT COULD UPDATE THIS EA TO THE LATEST VERSION OF MT4 SO I CAN USE IT. NB: IT'S A SINGLE FILE (.EX4) AND THE PRICE CAN BE NEGOCIATED TO BE SUITABLE FOR BOTH PARTIES. THANK YOU
hey friends, I am looking to build a smart trading robot, for the capital market. He knew how to trade in all the different types of trade. Example - in shares, currencies, index, indices, ETFs, funds, commodities, options, futures and so on. Suitable for trading on all stock exchanges in the world. It will be possible to install the trading robot in the MetaTrader 5 trading software. But it will also be possible to
STI EA 30 USD
I need to convert this MT4 indicator into MT5 EA/indicator. The problem is I only have the .ex4 file bt not .mq4 file and it is also a repainting indicator. I need preliminary assessment if the conversion can be done based on .ex4 file first before exploring the EA details further. Attached is the indicator Budget below is just indicative for the assessment. We can discuss further once the conversion can be done and
This mql4 got entry blue line and exit red line and pips inside also calculated it uses haiken Ashi and murray Math settings if you this you up for this job let's discuss it we will talk more when you are chosen thanks in advance
i Want to convert this Trading View Code to Mt4 Indicator indicator("NEOM Smart Money Concepts ", "NEOM Smart Money Concepts " , overlay = true , max_labels_count = 500 , max_lines_count = 500 , max_boxes_count = 500 , max_bars_back = 500) //-----------------------------------------------------------------------------{ //Constants //-----------------------------------------------------------------------------{ color
Hello Amazing developer am looking for profitable EA for mt4 and made for some past year and i will be looking forward for your bid if you have mt4 EA let Negotiate in the contact box best regards
Hello Amazing developer am looking for profitable EA for mt4 and made for some past year and i will be looking forward for your bid if you have mt4 EA let negotitate in the contact box best regartds

Información sobre el proyecto

Presupuesto
30+ USD
IVA (19%): 5.7 USD
Total: 35.7 USD
Para el ejecutor
27 USD