Ea trailing stop for 1 or more orders

MQL4 Experts

Job finished

Execution time 3 days
Feedback from customer
good
Feedback from employee
very nice and kind

Specification

I want to do 1 ea trailing stop for 1 or more orders.
 Rule: only count on 1 currency pair (not for every open currency pair but only for each currency pair)

 - * Average price = (price 1x size lot1 + price 2 x size lot2 +...+ price N x size lotN) / (size lot1 + size lot2 +...+ size lotN).
 - * If the total selling price 1 x size lot buy1 + selling price 2 x size lot buy2 ... > buy price 1 x size lot buy1 + buy price 2 x size lot buy2 .... --> then the direction  beneficial will be the price drop
 - * If the sum of buying prices 1 x size lot buy1 + buying price 2 x size lot buy2... > selling price 1 x size lot buy1 + selling price 2 x size lot buy2 ... --> then the direction is  The benefit will be an increase in prices

 1. SL: Initial SL for each individual order
 2. Trailing stop start: the starting point of the trailing stop, that is, when the price moves a point from the order price to the beneficial side, the trailing stop will start: a point (the yellow horizontal line can be shown on the chart).
 3. Profits lock: b points.  If the price moves a point from the order price to the beneficial side, the SL will be moved to b points, locking the profit at b points.
 4. There will be only 1 SL put together for all orders according to the Price Average when the Average runs to the Trailing stop start. All orders will use the same SL, not separate SL for each order
 5. trailing stop: c point
 6. trailing stop step: d point.  After the SL is placed at Pips lock, if the price moves further in favor of c points, then move the SL by d points to increase the locked profit.
 7. IMPORTANT: Trailing stop start a value and Pips lock b value will automatically change according to the number of open positions at that time.  When there are N open positions, Trailing stop start = a*N points and Pips lock = b*N points.
 8. IMPORTANT: trailing stop and trailing stop step are always fixed according to the setting, regardless of the number of open positions
 9. For example, when there is an order, if the price runs a point, the SL will be placed at b points, but then opens 1 more order, the total at that time is 2 orders, then there will be 2 open orders  --> On average, the price runs 2a points, the SL is placed at 2b points, after the SL has been placed at 2b, if the price runs more c points, the SL is moved by d points.
 10. If more new positions are opened, ea immediately recalculates Trailing stop start, profits lock and resets SL if Trailing stop start has been reached or deletes SL and waits if Trailing stop start is not reached.
 11. All parameters are in POINTS, 5 characters for currency pairs
 For example:
 Settings: SL 5000, Trailing stop start 1000, profits lock 500, Trailing stop 200, Trailing stop step 100
 There is an order to sell 1 EU lot at 1,00000 SL1 is 1.05000, then the price increases to 1.00500, then I place an order to sell 2 lots at 1.00500 SL2 is 1.05500.  The average price is 1.00333.  If price runs (1.00333-1000x2) to 0.98333 then SL2 and SL1 will both be SL = 0.99333 (1.00333-500x2).  If price runs (200 points) to 0.98133 , then SL will move to 0.99233 (100 points).
 However, when the price is at 0.98133 I place an order to buy 5 lots.  When averaging the price by 0.98958 (0.98133x5 > 1.00500x2 + 1,00000x1) --> the favorable direction is bullish.  The new Trailing stop start price will be (1000x3) 1.01958 --> delete the old SL (0.99233).  On the rise to 1.01958, the SL is 1.00458.

Responded

1
Developer 1
Rating
(376)
Projects
398
31%
Arbitration
62
19% / 69%
Overdue
50
13%
Loaded
2
Developer 2
Rating
(3)
Projects
3
0%
Arbitration
0
Overdue
1
33%
Free
3
Developer 3
Rating
(58)
Projects
83
53%
Arbitration
9
33% / 33%
Overdue
7
8%
Working
4
Developer 4
Rating
(71)
Projects
80
10%
Arbitration
35
9% / 54%
Overdue
6
8%
Working
5
Developer 5
Rating
(36)
Projects
45
2%
Arbitration
6
33% / 17%
Overdue
1
2%
Free
6
Developer 6
Rating
(42)
Projects
62
8%
Arbitration
12
58% / 42%
Overdue
1
2%
Free
7
Developer 7
Rating
(568)
Projects
641
41%
Arbitration
21
57% / 29%
Overdue
47
7%
Working
Similar orders
Indicator in use: Bollinger Bands Mechanism (See diagrams provided for help) Sells: 1. Trigger candle: When candle low is above the top Bollinger band - accurate to the lowest point scale (e.g. On EURUSD if candle low is 1.07915 and the value of top bollinger is 1.07914 - this is a sell signal; or if on Futures if the increment is .25 or .10 then this is used) 2. Enter sell ONLY on the next candle if price breaks
Indicator in use: Bollinger Bands Mechanism: (See diagrams provided for help) Sells: 1. Trigger candle: When candle low is above the top Bollinger band - accurate to the point scale (e.g. On EURUSD if candle low is 1.07915 and the value of top bollinger is 1.07914 - this is a sell signal) 2. Enter sell ONLY on the next candle if price breaks below the trigger candle LOW (using the e.g. above- if next candle price
hey guys, im looking for an auto mt5 license system through a web app i have already, i simply want it so a unique license key is generated for memebers, they input this onto the EA input and then it checks if its valid. active license per user capped at 5. i already have an mt5 coder and dec team for the app so i dont know if youd prefer to intergrate onto the webapp yourself or simply provide the code and doc so my
I need a simple panel to execute both buy and sell operations with very basic things like stopp loss take profit that functions for both market orders such as buy stop sell stop buy limit sell limit I don't care about colors or design I just want how you can do it what interests me most are the functions
I want to create an EA that can take bids according to information of a logic I have developed to give indication of a BUY or SELL opportunity. The EA will then be able to activate the BUY at the lowest possible position once the indicator clears it for a BUY and take bid upwards or identify the highest point and clears it for a SELL and take bids downwards. As you can see from example of JULY 2024 data to see how
We are seeking a skilled developer who can convert a Tradingview indicator written in Pinescript to a NinjaTrader indicator written in C#. The goal is to create a profitable trading strategy using this indicator. The successful candidate will have expertise in both Pinescript and C# programming languages, as well as a strong understanding of trading indicators and strategies. The main responsibilities will include
I am seeking an experienced MQL5 developer to create a user-friendly manual Grid Trading Expert Advisor (EA) with the following key features: Dynamic Grid Trading: Adjustable Grid Distance: Traders can manually input grid distance in pips via an intuitive, movable table. Take Profit Management: Fixed TP for the initial positions (e.g., first 5 trades). Stop-Loss (Optional): Traders can choose to use a stop-loss with
I want have the possibility to increase lotsize not alone by Lot-multiplier rather I want add a fix-lot increase for excample for 0,05 lot. I want have this for buy / sell and hedge-buy and hedge sell
Develop EA to track performance metrics of strategies I would like to develop an EA that will track the performance metrics of the strategies I have running on a terminal, If any of the metrics start to under perform then the EA/Indictor should alert me with a pop up alert that specify's the metric that has triggered the alert. The EA should also display the metrics in a dashboard - please see my example screen shot
I would like to modify the RSI Epert Avisor with a developer. I would like to use the RSI Expert on the inverse mode and the base setting doesnt conatain this strategy mode

Project information

Budget
30+ USD
For the developer
27 USD