Library

On contrast with Trailing Stop which a stop loss trails price until the price hits the stop loss and the position gets closed in profit, introducing Trailing Take Profit which take profit trails price when a position is in loss and ultimately the position gets closed with a loss. 

For example, If a position is in loss and current price hits TrailingTPStart (e.g. TailingTPStart is 500 points, when price reach 500 points from open price and the position is in -500 points in loss), Take profit starts to trail price and TrailingTPDistance is the max distance of trailing take profit and price.

I do not know it will help you or not, but this concept can be used in some EA without stop loss to lower loss in some points. 

  1. Run the TrailingTakeProfit EA.
  2. If TrailingTP_Mode is true, The EA will run. 
  3. Put the symbol name like, GBPUSD in the EA.
  4. Set TrailingTPStart . Which is the points from current price that take profit starts to run and trail the price when a position is in loss.
  5. Set TrailingTPDistance. Which is the maximum distance in points between take profit and current price. 

Download

The AK-47 Scalper EA is fully automated. It employs a strategy of continuously entering Sell Stop orders and will modify them when the price moves against the pending orders.

Download

This EA is a money management algorithm for opening and closing positions and uses martingale with a “multiplier”. 

 

 

  1. Run EA before opening any positions to get the best result.
  2. Run “MartingaleEA-5Levels” on any chart.
  3. “Martingale Mode” should be true. 
  4. Put the name of symbols e.g. EURUSD or GBPUSD.
  5. Choose a martingale multiplier and put it in “Martingale Volume Multiplier” to multiply a number to the previous volume. For example if you put 2 in this field, and the first position’s volume is 1 lot. another position will open with 2 lots volume and third position  will open with 4 lots. 
  6. This EA can open max 5 martingale positions so put a number between 1 to 5 in the field of “Number Of Martingale Trading).
  7. In distances field (distance 1 to distance5), you should put pips or points between each positions to open. 
  8. In the field of “Close all  positions when total take profit is” , put a number like 100, and when all martingale positions reach $100, all open positions will be closed.
  9. In the field of “Close all positions when total stop loss is” , put a number like -500, and when all martingale positions reach -$500, all open positions will be closed.

Download

This code is a risk management strategy for an Expert Advisor in MetaTrader that manages existing trades based on the input parameters. It focuses on closing trades when a profit or loss threshold is reached and employs a trailing stop loss to lock in profits as the trade moves in the trader’s favor.

Download

This Expert Advisor (EA) for MetaTrader 5 (MT5) opens multiple buy and sell orders based on user input. The EA has input variables for the number of buy and sell orders, risk percentage per trade, stop loss, take profit, and slippage. It also includes a simple user interface with Buy and Sell buttons that trigger the opening of multiple buy and sell orders.

The EA calculates the appropriate lot size based on the specified risk percentage and stop loss. It also checks the spread against the configured slippage before placing orders. The EA then opens buy orders if the average price is above the current ask price and sell orders if the average price is below the current bid price.

When a user clicks the Buy or Sell button, the EA will open the specified number of buy or sell orders with the calculated lot size, stop loss, and take profit.

Please note that this EA is a simple example and may not be suitable for live trading without additional modifications and optimizations. It’s essential to test any trading algorithm in a safe environment, such as a demo account, before using it with real funds.

Download

This EA takes calculates the current account balance and based on user’s input of risk and profit percentage , it can close trades either in profit or in loss.

This tool might be helpful to people who prefer this method in managing their positions.

NOTE!!!

In P_pro, I included a line of code which opens one sell position at a time. This is just to demonstrate how the EA works and I have removed this feature in money management mq5. 

If you notice any bugs or issues please let me know.

Download

Include file contains moving average group, a moving average group with 6 moving averages in PERIOD_W1, and a moving average group with 6 moving averages in PERIOD_CURRENT.

 

MA group is several different period MA lines in an array, yeah, double dimensional array. There is a very useful function call MA_Direction, which tell you whether the MA group goes with the same direction  in  controllable bars. The performance is very good. give me 5 stars, please!

 

With object-oriented programming, it is easy to integrate multiple strategies, one object for one strategy .

 

Of course, there must be the most basic order management, it according to the order’s comment to manage each order, so that different strategy could integrate.

Download

 

Beside, keep an eye on my signal!

This expert advisor uses three indicators to identify reversal of the price of a symbol. It uses a simple moving average along with a standard deviation and the RSI.

It sends a buy signal when the open price is lower than the moving average minus 2 times the standard deviation and the RSI is lower than the oversold value and the close price is higher than the moving average minus 2 times the standard deviation and the RSI crosses the oversold signal upwards. The take profit is equal to the ask price plus 2 times the standard deviation at the time and the stop loss is equal to the ask price minus the standard deviation at the time. It sends a sell signal when the open price is higher than the moving average plus 2 times the standard deviation and the RSI is higher than the overbought value and the close price is lower than the moving average plus 2 times the standard deviation and the RSI crosses the overbought value from above. The take profit is equal to the bid price minus 2 times the standard deviation at the time and the stop loss equal to the bid price plus the standard deviation at the time.

The buy position closes when the close price is higher than the moving average plus 2 times the standard deviation and the sell position closes when the price gets lower than the moving average minus 2 times the standard deviation. It resembles the boilinger bands technique.

This strategy is better used during non-volatile hours when there is no apparent trend and the market is more predictable. Its goal is to make a lot of small profits. The only symbols that should be traded using this strategy is the EURUSD and in lesser degree the GBPUSD. I trade only the EURUSD in small timeframes such as M5.

Download

Includes EA & Alert only with arrows.

This EA Buys when

 

  • macd divergence occurs on 5 minute timeframe
  • 1 hour stochastic main line is greater than signal line & between upper lower levels , currently 0-40
  • Daily exponential moving average 9 is greater than 20
  • 5 minute bar closes below 9 ema on the daily chart ( input 18 )

Closes trades on stops and targets or 

closes when the rsi period 7 closes above 77 overbought level. ( input 36 )

Sell trades inversed.

 

These signals with default setting have a small amount of trades .

test on 1 min data on atleast 4 years back

Download

This expert identifies macd divergence when

 

BUYS

 

  • stochastic main line > signal line
  • stochastic is between oversold levels ( control over duration how long has stochastic between these lvls input candle period 9 & 10 )
  • Closes trades based on the upper bollinger band level at the time trade is taken. stops are set at 100 % equal to target stoplosspercentTP
  • All indicators including the macd divergence are multi time frame capable .

Example you could have divergence occur on 4 hr timetrame , stocastic confluence on the 30min chart . and Targets and stops on the 5 minute bollinger band levels.

Sell inverse.

*The EA only trades if there is no other open trades*

Include alert only EA 

* when changing the timeframe settings must use 1 minute open data to test *

enjoy

Download

Â