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

工作已完成

执行时间2 小时
客户反馈
Very good job. Very engaged!
员工反馈
Very thanks for order! Please let me know if you need programmer.

指定

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












































反馈

1
开发者 1
等级
(1156)
项目
1462
63%
仲裁
21
57% / 10%
逾期
43
3%
空闲
2
开发者 2
等级
项目
0
0%
仲裁
0
逾期
0
空闲
相似订单
I am looking for a professional MQL5 developer to build a MetaTrader 5 Expert Advisor from scratch. The EA will be called LadyKiller EA. It must trade only the following instruments: • XAUUSD (Gold) • US30 / Dow Jones Index Requirements: • Strong and reliable buy and sell entry logic • Stop Loss and Take Profit system • Risk management (lot size control) • Maximum trades protection • Drawdown protection • Trend
I need an mql5 EA which can be used with 100$ capital very low drawdown The EA should be high frequency trading special for XAUUSD and btcusd or binary options but also the EA should be testable via strategy tester and demo test for five days is needed NO SELECTION CAN BE DONE WITHOUT TESTING when applying make sure you send the backtester results with demo EA testable via strategy tester
I currently have a powerful and well-structured Expert Advisor available on the MT5 platform. This EA is designed with: ✅ Advanced entry and exit logic ✅ Smart risk management system ✅ Automatic lot sizing option ✅ Break-even and trailing stop protection ✅ Spread and session filters ✅ Drawdown control features ✅ Optimized for XAUUSD and scalping strategies ✅ Suitable for prop firm challenges like FTMO It is built for
Do you need a profitable and well-structured trading strategy converted into a fully automated Expert Advisor on the MT5 platform? I specialize in developing advanced, high-performance EAs with: ✅ Smart entry & exit logic ✅ Risk-based lot size calculation ✅ Break-even & trailing stop system ✅ Spread & session filters ✅ Daily drawdown protection ✅ Prop firm (FTMO-style) risk compliance ✅ Fully automated trade
Hello, I'm looking to find out the cost of creating a mobile trading robot. I've tried to describe it as thoroughly as possible in the following document. I look forward to your response. I'd like to know the costs, delivery time, and how you plan to implement it before making a decision
I have an existing MT5 Expert Advisor (“E-Core”). I need an experienced MQL5 developer to integrate a structured risk management upgrade and a higher timeframe trend filter into the current code. Two files will be provided: 1️⃣ E-Core Source Code (Current Version) 2️⃣ Update Instructions File (contains exact inputs, functions, and logic to integrate) The developer must: Integrate the update logic
DO NOT RESPOND TO WORK WITH ANY AI. ( I CAN ALSO DO THAT ) NEED REAL DEVELOPING SKILL Hedge Add-On Rules for Existing EA Core Idea SL becomes hypothetical (virtual) for the initial basket and for the hedge basket . When price hits the virtual SL level , EA does not close the losing trades. Instead, EA opens one hedge basket in the opposite direction. Original basket direction Hedge basket direction (opposite) Inputs
Billionflow 30 - 100 USD
Trading specifications: Indicators: Bollinger band ( Period 40, Deviation 1 apply to close) Moving Average (Exponential ) Period 17 applied to high Moving Average ( Exponential ) Period 17 applied to low But Signal enter a buy trade when prices crosses the lower band of the bollinger band up and also crosses the moving average channel of high and low the reverse is true for sell signal
Hello, I am a user of the "BUY STOP SELL STOP V6" trading bot, which is an advanced Grid System bot. The bot is primarily designed for Gold (XAUUSD), but I want it to work on all currency pairs. "The bot contains a privacy/protection code that prevents it from running on other accounts or being modified on any platform, as it has a client account number lock mechanism" --- Bot Description & Current Settings Bot Type
I am looking for a highly experienced Pine Script v5 developer to build a professional, non repaint price action indicator for TradingView. or a ready made one so i can purchase. This is a structured two phase project. The goal is to create a clean, intelligent price action tool that works for both fast intraday trading and swing trading. Only apply if you have strong Pine experience and understand liquidity

项目信息

预算
30+ USD