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
등급
(2654)
프로젝트
3371
68%
중재
77
48% / 14%
기한 초과
342
10%
무료
게재됨: 1 코드
비슷한 주문
Simplebot 30+ USD
#include <Trade/Trade.mqh> CTrade trade; input double LotSize = 0.1; input int FastMA = 10; input int SlowMA = 20; int fastHandle, slowHandle; // Initialize indicators int OnInit() { fastHandle = iMA(_Symbol, PERIOD_CURRENT, FastMA, 0, MODE_SMA, PRICE_CLOSE); slowHandle = iMA(_Symbol, PERIOD_CURRENT, SlowMA, 0, MODE_SMA, PRICE_CLOSE); return(INIT_SUCCEEDED); } void OnTick() { double fastMA[2]; double
MODIFY AN EA TO OPEN MULTIPLE TRADES AT SAME TIME WITH DIFFERENT PRE-SET-TP LEVELS AND DIFFERENT ENTRY TECHNIQUES. (personal job) 30+ USD1 application Hie, either way is ok, i will open job in a moment, with only a few requirements ,which i have observed now 1--To completely remove martingale 2-its confusing how SL FROM and SL TYPE differ, also the fact 2 types of SL s can be selected at the same time , so its
In need of an automated bot that strongly detect support and resistance zones where price has a high probability of reacting ,rejecting or reversing. The zones should be built on combibation of of : (a)swing high and swing low.(b)repeated price reaction c)rejection strength (d)break and retest behaviour (e) consolidation origin before implusive move (f) strong displacement candles
I need a mt5 Expert advisor ea to manage intraday trades with strict risk management. The EA must -Handle between 5 to 8 clean trades a day max altogether throughout all 3 sessions. no big news trading times and no overnight trades -Use 1% on forex pairs and upto 2% on XAUUSD risk per trade - Automatically calculate lot size based on stop loss -use fixed RR ratio [1:2] For forex pairs, the stop loss should be
Ninjatrdaer Script 500 - 1000 USD
I am looking to purchase a ninjatrader script, if there is any for sale, i mean a ready made ninjatrdaer script that trade futures, i need the seller to show me a backtest of the system, you know send some results, I would like to see a 1 year and YTD backtest
I need a clean, bug-free MT5 Expert Advisor (MQL5) based on this exact mechanical scalping strategy on M5 timeframe for EURUSD. Indicators (built-in): - EMA 9 and EMA 21 on M5 - RSI 14 - ADX 14 (>25 for strong trend) - H1 EMA 21 above/below H1 EMA 9 for trend alignment Entry Rules (ALL must be true): BUY: EMA9 crosses above EMA21 (on closed bar) + RSI > 50 + ADX > 25 + H1 EMA21 > H1 EMA9 SELL: Mirror (cross below
Im after a person to copy, exactly MACD in TRADINGVIEW to use on MT5. Ive tryed alot of the apps available...Tradingview works for me. Im also after a person to make a real time chart, overlayed on the delayed chart Thanks
I will like to purchase tradingview strategy with high winning rate, i mean already made, tested and trusted and powerful strategy, i have tried to code my own strategy with lot of freelancers but nothing to me i am just wasting money, i have wasted lot of money already, so i need a high winning rate tradingview strategy, we can discuss price in chat, I will need to see some test result as well
Hi everyone, I am hoping that you would be able to help me with possibly an easy fix. I have exhausted all avenues to try and optimise a 3 min US100 / USTEC and convert from line script to MQL5 so I can automate through MT5. The trades are not correlating and there is a clear consistent discrepancy of approximately 123 minutes between a significant number of trades when comparing the same time period. I really hope
need a dots marking of a simple rules pullback indicator. in the .tpl file look at 28 Jan 2026, TF M5 basically it is just overlaping lows or highs of the previous candle price. there are 2 scenario to accomodate: 1. simple pullbacks 2. pullbacks with inside bar and outside bar involved

프로젝트 정보

예산
30 - 60 USD
기한
 1 일