Forum

How should I selectively close orders opened by different strategies in one EA? Help please!

Hi, I am having some technical issues regarding selective order closing in MT4, and I would appreciate the help! This is what I try to achieve: I have two different strategies on buy orders and two different strategies on sell orders, and I would set up specific order closing conditions for orders

How to store a ATR value for future reference? Dynamic stoploss and takeprofit, please help!

Hi everyone, I know this should have been posted before, but unfortunately I failed to find any reference. Basically this is the problem I am facing. Suppose I would like to open a buy trade when RSI passes 50, and I would like to use the last ATR value when the trade is opened as my stoploss and

Help with EA order placing mechanism, please

Hello, I am trying to make an EA, the main point is to set a long term sell order and while it is in profit but the trend seems to be reversing, place a buy order to hedge. I would like my EA to only place 1 sell order within a single day while it can place buy orders whenever the conditions are

Need help on my codes for email alerts

Hi, I have a simple EA and I would like to add the email alert function to it so that the EA can send me notification email once a trade is opened or closed. I have read several posts and used some codes provided by Nicholi Shen in my codes, however, things didn't work out the way I would it like

Help needed on setting up email alert when a trade is opened and closed

Hi, I need to add the email alert feature on my EA when a trade is opened and a trade is closed (by trailing stop/stop loss/take profit or just close the trade). I am aware of the function SendMail, but I have two issues that block my progress. 1. How to locate the most recent trade when sending the

Requesting help on finding peak and trough prices and finding the corresponding RSI values

Hello, I am trying to design an EA to trade on divergence between the prices and RSI values. I have read this article https://www.mql5.com/en/articles/1456 and borrowed some logic in my coding to transfer an indicator code into an EA code. However, I have two questions and I would greatly appreciate

Needing help on locating peak and trough prices and finding the corresponding RSI values, much appreciated!

Hello, I am trying to design an EA to trade on divergence between the prices and RSI values. I have read this article https://www.mql5.com/en/articles/1456 and borrowed some logic in my coding to transfer an indicator code into an EA code. However, I have two questions and I would greatly appreciate

Trading RSI divergence EA, code troubleshoot help needed!

Hi, I am trying to trade on RSI divergence, and coded as below. I borrowed some logic from RSI Divergence indicator codes, however, when I backtest it, this EA doesn't seem to function and the backtest ends in a second. Can someone take a look at my code and let me know where I got it wrong? I think

How to backtest EA based on signals from different timeframes in MT4?

Hi, I am trying to generate a trading strategy based on RSIs across different timeframes, however, there seems to be some issues when I backtest it. The EA doesn't seem to interact properly with the RSIs from different timeframes. For example, when I select "H1" and "M30" in "Period" in Strategy