Part of a code to implement in my EA

Trabajo finalizado

Plazo de ejecución 5 horas
Comentario del Cliente
Very good programmer and fast!
Comentario del Ejecutor
Great customer. and thanks for help.

Tarea técnica


Hello, 

I need a code to implement at my EA. 

Make sure you got every detail of the code and do not hesitate to contact me.

When my EA will call this function ( "int Moment()" ), the result of the code should be: +1 for UP trend, -1 for DOWN trend and 0 for NEUTRAL.


The following should be the parameters inputs:

input group             "MA"
input ENUM_TIMEFRAMES      MA_TimeFrame        = PERIOD_CURRENT;   // MA: TimeFrame
input int                  MA_Period     = 20;          // MA: Averaging Period
input int                  MA_Shift      = 0;           // MA: Shift
input ENUM_MA_METHOD       MA_Method     = MODE_SMA;    // MA: Smoothing Type
input ENUM_APPLIED_PRICE   MA_Applied_Price = PRICE_CLOSE; // MA: Type Of Price
input group             "VOLUME"
input ENUM_TIMEFRAMES      VOL_TimeFrame        = PERIOD_CURRENT;   // Volume: TimeFrame (Must be equal to MA TF).
input ENUM_APPLIED_VOLUME  Vol_Type       =   VOLUME_REAL;    // Volume: Type
input group             "GENERAL"
input int                  CalculateBars           =     300;     // Bars To Calculate
input int                  Moments_Average     =     20;      // Average of the Volume Moment


The function will calculate up to "x" last bars (CalculateBars = 300).

Every time 02 sequence bars (i and i+1) close (close price) above the MA trend line, it will initiate a new "moment" (UP trend), until 02 sequence bars close below MA trend line and initiate a new "moment" (DOWN trend this time).

So, when 02 sequence bars close above the MA trend line, the function will start to calculate the following data:

1) How many points is the diference between the value of the close price of the first bar of this "moment" and the close price value of the last bar. (Should be in points and always positive value) - "mov_distance"

2) The sum of the volume (real or tick) of all the bars that compose the "moment". - "vol_sum"

3) The result of the division from the sum of the volume and the distance of the bars movement. - "power = vol_sum / mov_distance"

This function will calculate it until the next 02 sequence bars close below the MA trend line.

When it happen, it will initiate a new "moment", but this time it will be a down trend. PS: Remember the "power" result must be always a positive value, because the "mov_distance" should be the result in points.


As we are calculating the last x bars (300 for example), it should happen a lot of mixed "moments" of up trends and down trends.

For each "moment" of this, the function code will save the results ("power") separately.

After that, it will calculate the average of all moments results. "Moments_Average". 


Now, the last part is:

If the value of the current "moment" is greater then the "Moments_Average", it will return +1 for up trend and -1 for down trend.

If the value of the current "moment" is minor of the "Movements_Average", it will return 0.

Han respondido

1
Desarrollador 1
Evaluación
Proyectos
0
0%
Arbitraje
0
Caducado
0
Libre
2
Desarrollador 2
Evaluación
(75)
Proyectos
124
44%
Arbitraje
14
29% / 50%
Caducado
17
14%
Libre
3
Desarrollador 3
Evaluación
(20)
Proyectos
28
7%
Arbitraje
0
Caducado
3
11%
Libre
4
Desarrollador 4
Evaluación
(2680)
Proyectos
3432
68%
Arbitraje
78
49% / 14%
Caducado
343
10%
Trabaja
Ha publicado: 1 ejemplo
Solicitudes similares
Mrwin 30+ USD
//+------------------------------------------------------------------+ //| NATHANIEL SMART TRADER EA v1.0 | //| MetaTrader 5 - MQL5 | //| EMA + RSI + ATR + Risk Management | //+------------------------------------------------------------------+ #property copyright "Nathaniel" #property version "1.00" #property strict #include <Trade/Trade.mqh> CTrade trade; //---
Mrwin 30+ USD
//+------------------------------------------------------------------+ //| NATHANIEL SMART TRADER EA v1.0 | //| MetaTrader 5 - MQL5 | //| EMA + RSI + ATR + Risk Management | //+------------------------------------------------------------------+ #property copyright "Nathaniel" #property version "1.00" #property strict #include <Trade/Trade.mqh> CTrade trade; //--- Trading settings input double RiskPercent = 1.0; input
--- I need an MT5 Expert Advisor (EA) for Forex trading. Strategy: - Trade when fast Moving Average (9) crosses above slow Moving Average (21) = BUY - Trade when fast Moving Average (9) crosses below slow Moving Average (21) = SELL - Only 1 trade at a time Settings I want to change: - Lot size - Stop Loss in pips - Take Profit in pips - Trailing Stop - Trading hours (Start and End time) Risk: - Close all trades at
ICC SMART STRUCTURE EA 50 - 100 USD
DEVELOPMENT REQUIREMENTS Project Title: ICC Smart Structure EA – MT5 Automated Trading System 1. Project Objective I want a fully automated Expert Advisor (EA) for MetaTrader 5 (MT5), based on my Indication–Correction–Continuation (ICC) trading strategy. The EA must identify market structure, Break of Structure (BOS), swing highs and lows, supply and demand zones, corrections and continuation entries across multiple
I want reading tradingviwer signal and want open mt5 account trades. Want reading stop loss size and take a profit size and when signalClosing ! This ea want cancel open trades
برمجة روبوت تداول MQL5 بهدف 50 نقطة مع إدارة مخاطر.مطلوب برمجة خبير تداول آلي يعمل على منصة MQL5، يركز على تحقيق هدف 50 نقطة مع إدارة صارمة للمخاطر وتحديد وقف الخسارة
Hello, I'm looking for a developer who can build an automated trading bot (Expert Advisor) for MetaTrader 5 (MT5). I want a smart trading robot that can scan the markets, identify high-probability trading opportunities, and automatically execute trades. Strategies and indicators I'd like included: RSI (75 overbought / 25 oversold). MACD crossover with strong momentum. 9/21 EMA crossover. 20/50 SMA crossover. Smart
Delete/Remove . Integrate Support & Resistance . Prop Firm Expert. (Expert is Active With a firm's account) . (Tick Volume) spikes specifically when price interacts with pre-defined Support and Resistance zones. [ required ]
I am looking for an experienced MQL5 developer to create a simple, well-organized Expert Advisor for MetaTrader 5. Requirements: - Provide complete and editable MQL5 source code. - Explain the EA's functionality and logic clearly. - Include configurable settings. - Include appropriate risk-control features. - Provide clear installation and testing instructions. - Ensure the code is clean and properly documented. I
PROJECT NAME: BALISA AI VERSION 1.0 I want to develop my own automated trading robot called Balisa AI for MetaTrader 5 (MT5). REQUIREMENTS: 1. The robot must support Forex and Gold (XAUUSD). 2. It must operate as an Expert Advisor (EA) on MT5. 3. It must automatically identify trading opportunities and execute buy and sell orders. 4. It must have Stop Loss and Take Profit. 5. It must include risk management to

Información sobre el proyecto

Presupuesto
30 - 60 USD
Plazo límite de ejecución
a 1 día(s)