Part of a code to implement in my EA

작업 종료됨

실행 시간 5 시간
피고용인의 피드백
Great customer. and thanks for help.
고객의 피드백
Very good programmer and fast!

명시


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.

응답함

1
개발자 1
등급
프로젝트
0
0%
중재
0
기한 초과
0
무료
2
개발자 2
등급
(75)
프로젝트
124
44%
중재
14
29% / 50%
기한 초과
17
14%
무료
3
개발자 3
등급
(20)
프로젝트
28
7%
중재
0
기한 초과
3
11%
무료
4
개발자 4
등급
(2674)
프로젝트
3412
68%
중재
77
48% / 14%
기한 초과
342
10%
무료
게재됨: 1 코드
비슷한 주문
take your time better make it for days and have good bot than never benefits both of us. Make the bot have zero errors and backtest it for a 2 year period
Wise Legend 30 - 500 USD
I want this robot to alert me on a good entry point on the trading flat form ether to buy or to sell. And also alert me when to close the market. And alert me on market continuations
I have an existing MT5 Expert Advisor with the original MQ5 source code. I need an experienced MQL5 developer to review, debug and professionally improve the existing EA, not build an unrelated EA from scratch. The EA is mainly for XAUUSD and already contains entry signals, EMA filters, automatic lot sizing, basket profit management, spread/margin protection, news filtering and recovery logic. The main problem is the
Exact Pine Script Conversion: The EA must replicate my Pine Script exactly — including Support/Resistance, Liquidity Grab/Sweep, 30 EMA, Entry, SL, TP, Partial Booking and Breakeven . No assumptions or changes to the logic. Accurate Entries: The EA must enter exactly according to the Pine Script conditions, including the correct candle and price level after the Support/Resistance or Liquidity Sweep setup. SL & TP: SL
I buy EA for USDEUR or XAUUSD for FTMO with proven backtest. Send me images with backtest reports where daily max dd is 1% on 200k account. I can buy several eas if you have them with proofs. Need images of backtesting for 5 years
Cerco uno sviluppatore MQL5 esperto per lavorare su un Expert Advisor (EA) XAUUSD per MetaTrader 5 già esistente , versione attuale XAU_V59.mq5 . L'obiettivo è modificare, correggere e sviluppare il codice esistente senza stravolgere la logica già presente , mantenendo le regole ei parametri già definiti, salvo le modifiche espressamente richieste. REQUISITI FONDAMENTALI Il codice deve essere scritto in MQL5 nativo e
I need an MT5 Expert Advisor for a mean-reversion strategy on EURUSD: single entry at local price extremes, fixed stop loss and take profit, no grid and no averaging. Position size must be calculated automatically so that risk per trade is capped at a fixed USD amount, with a daily loss limit and a pause after consecutive losses. I will send the full specification — entry conditions, filters and all input parameters
I trade NAS 100 using Harmonic Patterns. I want to create a MT5 EA to trade based on this indicator: https://www.mql5.com/en/market/product/78325?source=Site +Market+MT5+Indicator+Search+Rating006%3abasic+harmonic+patterns I want the EA to have the same take profit levels as indicator: TP1, TP2, TP3 (select in inputs which TP to use). The EA should also use the same Stop Loss as indicator, with the option to adjust
I am looking for a professional and market-savvy MQL developer to build a disciplined, stable Scalping Expert Advisor (EA). The ideal developer must have a solid understanding of Trend Identification, Fibonacci Levels, and Technical Indicators , alongside strict risk management implementation. Key Focus Areas & Developer Requirements: Market & Analysis Expertise: ⚬ Deep understanding of Trend direction (Market
I need an expert Ninjatrader8 developer that can build this indicator. Can you build indicator like this? Ather https://share.google/HaxK5snnOWFR08ghd If you know you can do this send me message or bid to my proposal

프로젝트 정보

예산
30 - 60 USD
기한
 1 일