This is an automatic partial hedging scalper to offset usually too many orders opened by another EA and market going opposite majority of open jobs.

MQL4 Uzman Danışmanlar

İş tamamlandı

Tamamlanma süresi: 8 gün

İş Gereklilikleri

EA will be dropped/attached to a chart and then read all open orders for that chart's instrument. Then it will determine how many are buy orders and how many are sell orders and then calculate the difference. Next it will use ADX to determine volatility and currency pair direction and open 1 market order for hedge lot size indicated in EA extern input field by user (I will use default 50% in this example) in the direction of fewer orders to create a hedging effect. The target price will be close to current market price thus a scalping strategy with usual TP, Stop-Loss, and trailing stop (trailing stop default = 0).

When TP achieved then it will loop to for beginning and re-test. If stop-loss reached then it will also loop and re-test. EA will never trade in direction of greater number of open orders ... that would not be a hedge. Usually another EA (I will call ABC) is running in a separate chart window and creating buy or sell orders continuously with the logic programed into that EA. This EA (I will call XYZ) will monitor all open orders in separate 1 Min chart window and use ADX for volatility and direction. There should also be a switch input to continue EA or discontinue whether it is active. If the order reaches stop-loss that is an indication market is trading in direction of majority of open orders and so XYZ will wait and re-evaluate periodically (wait period can be input in milliseconds by user).

Again, Logic flow of steps

1. Calculate difference between buy and sell orders in chart (in this case EURUSD)

2. determine if prices are going up or going down (in this case they are going up and another EA ABC was selling so there are many sell orders)

3. determine if there is sufficient volatility to take risk of opening a trade against orders opened by ABC ... the trade will be half because user put 50 in input called PercentHedge

4. this EA determines there is sufficient volatility AND price action is against current open trades so it opens new buy order for (50% * [difference between open sell orders and open buy orders])

5. this is a partial hedging EA that uses scalping strategy so it will have small TP and small Stop ... it can use trailing Stop but default is 0

6. wait for orders that were opened by this EA to close by TP or Stop and then go to 1.

Inputs I foresee are:

EA Active (Boolean)

PercentHedge (if there are sell orders = .15 and buy orders = .10 and PercentHedge = default 50 then XYZ will create open order for ([.15 - .10] * 50% and round up ... in this case .05 * .50 =.025 so .03 will be calculation used for hedge

TP (target price in points [5 digit broker])

SL (stop-loss in points)

Trailing stop-loss distance activated from order price

Trailing stop-loss steps

Period of ADX indicator

Level of ADX indicator (volatility)

Slippage

Magic Number

Comment (for comment field in buy/sell order to differentiate it from other open orders or closed orders)


Further clarification (hopefully)

Imagine I have a terminal with another EA (ABC) in chart 1 and this EA (XYZ) will be in chart 2 and chart 2 is M1 ... when I attach XYZ to chart 2 it will open 1 order for  .23 ([1.90 - 1.44] * .50) lots if PercentHedge = 50.

Next chart show when XYZ will open trade

You can see 1) ADX is rising so volatility is good, 2) D+ is over D- so price is rising, 3) previous chart shows there is a difference between buys and sells so now all conditions to open a 1 order for .23.

If price goes up then small TP is reached and process repeats, if price goes down then small Stop-Loss is reached and XYZ will do nothing because it is only making buy orders because chart has more sell order than buy until other EA in chart 1 closes some orders with whatever logic it has.

... more inputs to test in Strategy Tester to demo EA but not required in real EA. Extra inputs are to simulate another EA in chart 1.

...

First chart is 30 minutes for chart 1 (ABC) ... second chart is 1 minute for XYZ for testing volatility and price direction at scalping level.

...

Again, XYZ will never trade in direction of greater total number of lots ... it will only trade in direction of fewer total number of lots ... it requires direction help of ADX to know when to open orders in same direction of fewer total number of lots

...

I would also like a button on the screen to activate / deactivate the EA and the button should clearly indicate whether the EA is Active or Not Active on a gray colored button (the EA will actually reset everything to before I attached the EA to the chart because later I might add an additional feature (I'm thinking about adding a line I can move that will also perform the function of the button but I have to think about it further in order to completely describe it with accuracy) Default location of the button should be lower left bottom of the screen but follow same distance from corner when I resize window for any reason with usual 1,2,3,4 user input to locate at top left, top right, bottom left, bottom right respectively.


...

This should be a good EA to help protect account when another EA opens too many orders. Once this EA is created and meets all requirements in this job order and tested I might need to create better version after actual use and after discovering any deficiencies in which case a new MQL5 job will be created.

Feel free to discuss anything regarding this job with me especially if any clarification is needed.

Yanıtlandı

1
Geliştirici 1
Derecelendirme
(1925)
Projeler
3542
88%
Arabuluculuk
73
40% / 15%
Süresi dolmuş
268
8%
Serbest
2
Geliştirici 2
Derecelendirme
(1)
Projeler
1
0%
Arabuluculuk
1
0% / 100%
Süresi dolmuş
0
Serbest
3
Geliştirici 3
Derecelendirme
(130)
Projeler
210
40%
Arabuluculuk
90
20% / 43%
Süresi dolmuş
85
40%
Serbest
4
Geliştirici 4
Derecelendirme
(270)
Projeler
550
49%
Arabuluculuk
56
39% / 36%
Süresi dolmuş
227
41%
Çalışıyor
5
Geliştirici 5
Derecelendirme
(91)
Projeler
144
38%
Arabuluculuk
67
15% / 48%
Süresi dolmuş
55
38%
Serbest
Benzer siparişler
I am good in coding. I am a Quant Developer in a Company. I like to create the idea in to code. I love to code in C++, Python and MQL
General information: EA have to have possibility to modify working hours(3 times a day) for each RULE for example to be able to set : 8:00-11:00, then 13:00 to 16:00, then 19:00 to 22:00. (just an example for you to understand, 3 options). EA have to work on XAU/USD pair. Entries will be taken on M30 interval. H1 interval for trend(it will determine if we hold positions longer or close early at 50pip). If EMA 6 >
im starting to think more that short term scalping on m1 or m5 could work well if we can get around the spread size issue. does anyone have experience of this, or even have any EAs that work on the short term in and out in a few seconds or minutes? I have an idea using a grid and a pair of buy/ sells possibly opened at the same time with different lot sizes, trend following where the winning trades are used to write
I need an Expert advisor based on AOX signal . it must have check and handing of trade operation..errors. The main criterin for opening and dosing a position : moving average direction the price is higher than the previous bar Trade lots is input parameter bar
Hello I need an include file for prop trading. That means I want to include it in all of my EAs. For the news filter we use forexfactory.comThe inputs will be: Max. DD in % per day: 2 Max. Profit in % per day: 2 News Filter: True/False News Impact: Low/Medium/High Stop trading x Minutes before News: 10 Stop trading x Minutes after News: 10 Hold Trades through news: True/False Hold Positions overnight: True/False
Specification I am looking for a developer to create a custom one-click trading tool (EA) for MT5 , inspired by PZ Trade Pad Lite ( reference link ). The standard MT5 one-click trading and PZ Trade Pad Lite are useful but do not fully suit my needs. I require an EA that allows me to place trades directly from the chart with specialized entry rules, automated stop-loss/target placement, and risk management for BTCUSDT
I have a working strategy for Boom and Crash and need a programmer to build an MT5 Expert Advisor (EA) that trades on the 1-Minute timeframe . Key Requirements: Developer should have at least basic knowledge of Boom and Crash trading. EA must work only on candle ticks for Boom and Crash. The EA will receive trade alerts from my indicator and automatically open trades based on those alerts. No duplicate trades should
20 EMA Xauusd 30+ USD
I need a robot which open buy order when price cross above 20 ema , and open sell order when price crosses below 20 ema on 15 minutes time frame. 20 pips stop loss. 20 pips Target. I need robot in which i can change lot size as i wish
I want to.replocate this idea 💡 it's, on YouTube as well. If you can make this idea into an ea.to backtest that would be good. Once you can do this I can give you the rules for entry. Just state whether you can do it or not it would be good if you just give me an example based on the last heiken ashi bar colour no problems. State the price to do it aswell
i want to create EA with smc wave trend indicator for mt4&5 Trend Identification: The EA uses built-in indicators to determine if the market is in an uptrend or downtrend. Signal Generation: When a trend is confirmed, the EA generates a signal for a buy or sell trade. Automated Trading: The EA automatically places orders based on the signals, often entering trades at specific points within the trend. Trade

Proje bilgisi

Bütçe
30 - 150 USD
Geliştirici için
27 - 135 USD