Class-driven Averaging Subroutine - position averaging function, opening positions against the trend

MQL5 Esperti

Lavoro terminato

Tempo di esecuzione 43 giorni
Feedback del dipendente
Great customer. Clear instructions. Thanks. Look forward to more jobs in the future.

Specifiche

Develop a class-driven sub-routine that can be implemented in a variety of existing Expert Advisor with minimum complications of integration. It should implement a good OOP concept for reusability and derive sub-mechanisms.

This sub-routine will work on algorithms running on MT5 terminal; we may need to develop an expert advisor opening a long or short position for test. This subroutine purpose is to implement a strategy of averaging down.

This is that we open:

BUY 1 LOT EURUSD at 1.19209

This sub-routine will open automatically

BUY 1.3 LOT EURUSD at 1.19172 with a comment "Level_1"

Resulting on an average price in EURUSD of 1.19195 at 2.30 LOT, so this sub will draw a BLUE line at this average level. RED if SELL position.

Attention: For different LOT of positions, the average price is calculated using a mathematical formula.

Finally, will open automatically if the price continue against:

BUY 1.69 LOT EURUSD at 1.19078 with a comment "Level_2"

This next average level as is not open yet so will draw a line in "Bisque" color with the parameters of the averager sub-routine in this case the LOT factor increases to a 30% or 1.3X and the amount of PIPs in the following format:  1.30X/1.69N/94p indicating the average %, resulting lot size and pips in distance.

If this average level is triggered then the average price of the EURUSD position is 1.19145 at 3.99 LOT.

The PIPs difference between 1.19209 and 1.19172 and the next 1.19145 is provided as a parameter for the sub-routine.

The averager sub-routine will have a maximum amount of positions to open. And a FLOOR parameter that sets the minimum distance, this distance can be set in price or points. If in the example below we set a price floor of 1.19130 the next level provided can not be 1.19145 and will be floored at 1.19130. If we set a points floor of 70 pips the next level can not be 67 pips as provided and will be floored at 70 pips.

The subroutine will increase distance in the same way to increase volume, this is that an increment can be set of a 10% or 1.1X added to the distance provided.

If the instrument maximun volume is 50, and the next average down is 56. We will fraction the order in 50 (the max.) and another position at the same price level at 6, with the same comment. If the broker have a maxium limit of positions and can not open, we will pop-up a message alterting with the limitation of opening new positions. 

Finally, the sub-routine will use a time delay to evaluate if a different distance in pips is supplied.

Inputs:

AveragerFunc(
             bool AverageUSE=true,
             int Distance=1,
             ENUM MinDistType=1, //1-Price, 2-Points
             double MinDistVal=0,
             bool UseCalcDelay=true,
             ENUM CalcDelay=1M, //1M,2M,5M,15M,1H,1D,1W, TF defaults in example
             DistanceFactor=1.1, //points + 10% in this case
             LotsFactor=1.3, //volume + 30% in this case
             MaxOrders=10, //maximum of averaging positions
             string s="Averager " //default comment for opening positions and concatenate
             )

Output of the subroutine will be:
LOTs BUY:        2.3             //actual volume size
LONG Avg:       1.19195       //actual average
LONG N Avg:    1.19145       //next average

The average calculation have to take into account any commission and swap charges in any given period. So if this positions stays for more than a day and a swap is charged, have to be reflected in the resulting average price every day.

Attached an image of the horizontal lines.

Con risposta

1
Sviluppatore 1
Valutazioni
(27)
Progetti
43
7%
Arbitraggio
18
6% / 78%
In ritardo
26
60%
Gratuito
2
Sviluppatore 2
Valutazioni
(169)
Progetti
204
30%
Arbitraggio
25
40% / 44%
In ritardo
12
6%
Gratuito
Ordini simili
EA for mt4 30+ USD
I'm looking for an experience developer that can help develop an EA based Strategy below into EA itself no issues if used martingale & fix lot . Symbol: XAUUSD i will explain to the developer more datils before doing the EA. i will send the indicator and the set point. 1- indicator extreme 2- stochastic Oscillator can you add lots of features to your EA which will be so much useful such as 1- Trailing stop 2-Break
Looking for an ea that pass prop firm accounts. Can be any instrument forex or indices. Proof must be provided either with an account it’s running on or a trial period EA. No screenshots
HFT MT5 EA - US30 150 - 250 USD
Job Offer: MQL5 Developer Needed for Prop Firm Challenge MT5 EA (US30 I am looking for an experienced MQL5 programmer to build a high-performance trading bot for MT5, designed to pass prop firm challenges with selected providers. The EA should be focused on index trading , specifically US30 (Dow Jones) Requirements: Proven expertise in MQL5 and algorithmic trading Development of a fast, automated
PAIR : EURUSD ONLY TIMEFRAME: M1 SESSION:LONDON SESSION ONLY(CONFIGURABLE START / END TIME) TREND FILTER: - USE VWAP AS MAIN TREND FILTER - BUY ONLY WHEN PRICE IS ABOVE VWAP - SELL ONLY WHEN PRICEIS IS BELLOW VWAP STRUCTURE CONDITION : - TRADE ONLY AFTER A VALID BOS (BREAK OF STRUCTURE) - BOS MUST BE IN THE SAME DIRECTION AS VWAP TREND -IGNORE COUNTER-TREND BOS ENTERY CONDITION (ORDER BLOCK ): - AFTER BOS , WAIT FOR
Hi, I’m looking for an experienced MT5 developer to build a manual trade copier EA (Master → multiple Client accounts). I trade manually on my master MT5 account, and whatever I do (open, close, SL/TP change, partial close, pending orders) should be copied automatically to my clients’ MT5 accounts through a server-based system (clients can be anywhere, any broker). I want to be honest: I already tried developing the
I am looking for an experienced developer to create an automated trading bot on the Quantower platform based on my trading rules. The bot should execute trades automatically. Kindly bid for it if it is what you can code for me
Jadyne hassan 30+ USD
This is to push trading to another level no much words if you want to improve the stage of your art in trading Thier is no need to look back because its an empowered account manager as well the generation development ai robot never challenged but it always require the tap and the rest it's own businesss
MT5 Expert Advisor – XAUUSD Opening Range Breakout I am looking for an experienced MQL5 developer to build a robust MT5 Expert Advisor. STRATEGY DETAILS • Instrument: XAUUSD • Timeframe: M30 • Broker: Pepperstone (Spread Betting) • Trading days: Monday–Friday only OPENING RANGE • Opening range candle: 07:00 – 07:30 UK time • EA must automatically convert UK time to broker server time • Record OR High and OR Low from
EA should trade Gann indicator arrows filtered by Autotrendline indicator. Two orders per trade and when first level of Gann indicator is reached SL of second order should be moved to breakeven
I want to find a Developer to perform this work and settle payments in this Application. I undertake not to communicate with Applicants anywhere else except this Application, including third-party messengers, personal correspondence or emails. I understand that violators will be banned from publishing Orders in the Freelance service. I have read the Rules of using the Freelance service and accept them. I agree

Informazioni sul progetto

Budget
150+ USD
Scadenze
da 1 a 10 giorno(i)