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;
input int MA_Period = 20;
input int MA_Shift = 0;
input ENUM_MA_METHOD MA_Method = MODE_SMA;
input ENUM_APPLIED_PRICE MA_Applied_Price = PRICE_CLOSE;
input group "VOLUME"
input ENUM_TIMEFRAMES VOL_TimeFrame = PERIOD_CURRENT;
input ENUM_APPLIED_VOLUME Vol_Type = VOLUME_REAL;
input group "GENERAL"
input int CalculateBars = 300;
input int Moments_Average = 20;
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.
Benzer siparişler
//+------------------------------------------------------------------+ //| TrendPullbackScalper.mq5 | //| Author: Meta AI | //| Strategy: Trend + Pullback Scalping | //+------------------------------------------------------------------+ #include <Trade/Trade.mqh> input double InitialLots = 0.01; // Initial lot size input int StopLossPips = 5; // Stop Loss
Project Title: Convert Pinescript TradingView Strategy to MQL5 to EA bot Project Description: I am looking for an experienced MQL5 developer to convert a TradingView Pine Script strategy into a fully automated MetaTrader 5 Expert Advisor (EA). The goal is to have an identical replication of the strategy logic and backtest results. Key Requirements: Logic Conversion: Translate all Pine Script indicators, entry
Hello, I have the code for an indicator file that works with binary options. I want to make a simple modification to it that won't take much effort for professionals. In short, the modification I want is that if the strategy's conditions are met, a buy or sell signal should appear at 17:55. The strategy works exclusively on the 5-minute timeframe, and I want to delay the signal by 7 minutes so that it appears and
描述(项目概述): 我需要为 MetaTrader 5 平台开发一个功能完整的智能交易系统( 专家顾问 ),用于交易 XAUUSD (伦敦金)。该 艺电 的核心是基于一份详细的技术规格书,实现一个多指标共振、多层条件过滤的短线反转策略。 1. 核心策略逻辑简述: 交易品种与周期:主交易周期为 M30 ,需在代码内部动态读取 H4 周期进行趋势过滤,并监控 M5 周期以执行复杂的出场逻辑。 入场机制:采用 “ 价格触发 -> 成交量确认 -> 多指标渐进式达标 ” 的严格流程。入场信号需在特定时间窗口内,同时满足布林带突破及 5 个动量指标( CCI、RSI、MFI, 威廉指标, 随机指标)的超买 / 超卖条件,并受 H4 级别趋势过滤器约束。 出场机制:采用三层递进逻辑,包括动态保本移动、 M5 周期指标集体反转信号以及基于 K 线形态的趋势反转终极止损。
SMC, etc.) - Backtest results and the set files you used - Whether you’re willing to make minor tweaks so I can use it as my own If the performance looks good, we can discuss adjustments and next steps. My requirements are screenshot, backtes results, demo fileS Let me know if you have anything that fits the bill
iF you already have an successful MT4 EA for scalping in M5 XAUUSD [and eventually EURUSD and USDJPY] working essentially ON the trend when there is an Break Of Structure but also on reversal eventually with strategy Martingale with param ON/OFF eventually with strategy Grid with param ON/OFF eventually with HEDGING with param ON/OFF and on each trade : Stop loss, Trailing sl without High Frequency Trades [means
1-tow trades with take profit stop loss pips trade with take profit stop loss pips trade with stop loss pips take profit candle close 2-buy or sell look for last candle buy or sell 3-trade stop loss stop loss martingale trade lot zise in intry candle running candle or new candle
Hi all, I would like to get a bot that trades based on a Tradingview indicator. The indicator is called sniper entries. It is very simple. If the indicator says "BUY" then the EA buys, if the indicator says "SELL" then the EA sells. I want the bot to possibly trade forex market pairs like XAUUSD, EURUSD, GBPUSD. Would you please inform me what i need to do to make it possible. I also want the bot to trade on a small
can you help me with the strategy for my mt4 or mt5 bot? I am learning trading, while working and I was thinking this could be a good way to still earn from the market while learning. If I have someone like you to guide me on strategy and maintaining the trading bot going forward. I do not have anything setup, I am going to pay a ten to build the EA, I just need the mentorship and we can agree on a unique price to
Good day, I am searching the very high level expert, which could create the auto-trade robot and I would like to order the trading robot for GOLD XAU/USD auto-trade on MetaTrader. I could pay a lot for the institutional grade auto-trade robot, just contact me and let me know what level of the robot you could offer and we will negotiate the price