In MT4, EAs identify orders by magic number. But in MT5, one symbol has only one position at one time, and it has only one magic number at one time. EA can find deals by POSITION_ID. But if positions reverse, POSITION_ID changes. So after positions reverse, EAs might lose controls of the position....
SatisfyDisappoinmentI doubt about thatsAny comment
Hi Guys,
iam new here and hopefully in the correct forum for my question.
I have programmed an MQL4 script for MetaTrader 4 but somehow it is not working correct. It does not open a Buy or Sell order when the signal is coming.
It would be very helpful if someone with more experience could...
Hi everyone, I need help with this problem. I have tried to search for the solution on the web without success. I am testing my EA on a live account in order to modify it. I tried to backtest the exact same period after running it for one week. The results are totally different (they also don't make...
I wrote an EA for opening market orders with predefined StopLoss and TakeProfit. The default setting is 0 on both, meaning no SL no TP. However, when placing the EA user can enter SL and TP values as inputs. When both are different than 0 (no SL no TP) the EA performs as expected. When entering a...
Hi All, Is it possible to automate trading based on certain criteria being met by my indicators? I guess i'm after an 'if this then that' application to this. I seem to be making good manual trades based on the indicators I have. Thanks
Hello,
Can someone help in having the strategy tester visualisation to update smoothly? Is there any special command to update the visualisation?
Sometimes it does not update. I can make it update by moving the chart with the mouse but it is often inefficient. Specially with positions opened on...
Hi guys, Wondering - is there a way to command MT4 to backtest an EA? Either via command line or something else? I'm looking for a way to automate backtesting in MT4. Thanks
hi, I'm fairly new to coding but I cant seem to work out what I need to change in this section of code to make the third candle in the trade set up to close lower then it opened for sell trade, and higher then it opened for buy trade. Thanks for your help.
bool inside_bar =...
Is there anyway we can execute TP and SL in fast moving market without using script
Hello friends,
I am totally a novice at programming. Can somebody add trailing stop loss function to the attached Expert advisor. It should be active on all trades on the chart and close all trades when desired profit is achieved. All help will be greatly appreciated.
I wanted to start a share and reapply disscussion on forex mechanical trading. I dont want anyone to share their trading secrets, however, I want to ask has anyone of you succeeded in developing a robust forex trading strategy?
I am a newbie in the field but after testing some handfull...
I can't find metaeditor icon on metatrader4 mobile platform.
I have an EA I had developed, and there are 5 different ways to exit the trade. So I'm testing it on the same pair with same trading hours.
My trade that exits by opposing signal is still open. It opened within the trading hours I specified, but it's now past the trading hours I had specified...
Client Terminal Build and Version (32 or 64 bit)
MT4 ver 4.988 With Compiler ver. 5.1351
Problem description
Compiler doesn't create EX4 version that places stop losses, while previous compilers do compile an EX4 that places stop losses.
Previous versions of MT4 4.950 and Compiler version 5...
Hi guide some error is coming. 2013.04.11 22:00:15 RSI new (NATGASAPR13,M10) CTrade::OrderSend: market buy 1.00 NATGASAPR13 sl: 219.8 tp: 229.8 [invalid order] 2013.04.11 22:10:16 RSI new (NATGASAPR13,M10) CTrade::OrderSend: market sell 1.00 NATGASAPR13 sl: 229.3 tp: 219.3 [invalid order]
I can send a test email fine from mt4. But I would like an email once an Expert Advisor places a trade. Is there a little line of code I could include in the EA. I would just like the subject of the email to be the pair traded, buy or sell and price traded. Then another email would go when the EA
Hi,
I'm making an EA to work with fractals and each time that appears an upper/lower fractal and its > or < than EMA it should generate new orders or modify the existing ones and in open orders it should change only the SL.
At beginning it puts the buy stop order, change it and after some...
Kindly add trailing stop function to this EA. I ordered from freelance but developer is not available to modify EA for me.
Hello, i face this error and i can't find the solution return code of the server 3396333104 i'm using this function uint SendRandomPendingOrder(long const magic_number,string Symbol_name,double open_price,string order_type,double lot,double Stop_Loss,double Take_Profit) { //--- prepare a...
Hi
During the testing the SL and TP were not triggered when the price was reached. Has anyone experienced this ? This happened several times. I appreciate any help .
Hey there, WebRequest() isn't working with indicators, for whatever reason, therefore I need a possibility to load a file from a http or ftp. The samples I found to work with wininet.dll dont seem to work, any of them produces errors and not results. I am not that familiar with internet stuff, so I...
Dear Community, I would like to know what makes an Expert Advisor to be universal (to attach on one chart and trade all symbols)? for the following code: #property copyright "Copyright © 2011, Krzysztof Sosnierz" #property link "" // Current counters int market = 0 ; // Previous counters int
Hello all, I have a script here that calculates a moving average of the last N mid prices (N = 5, mid price = bid+ask/2) at every book event, (10++ per second). My issue is about the simple calculation. I dont know if there is some kind of delay because of the loop that populates the array i
Regularly I use the "Strategy tester" to optimize my expert. I was making analysis from 1-Oct-2015
However when I changed the computer, and install the MT4 again, the "Strategy tester" only allows me to simulate from Jun-2016, which is terribly short.
Is there any way to force to a simulation...
Hello, me and my friend made, what seems to be, a very good EA. We bought real tick by tick history, imported it in MT4 and backtested it since jan. 2007 to jul. 2016 (10 years), because we want it to be long term profitable. We're testing it on live account for few months now and it seems to be...
Hi
I'm looking for a code which closes all open orders ( long and short ) for the current pair, when one of the orders hits TP or gets manually closed
Right now i'm struggling with the spread which causes not all orders to close due to the difference, and to me adding that code...
[Deleted]
Hi guys!
I need of a function that returns the number of orders in a specified pair of currency.
PS: Fot MT4
Someone can help me?
Have anyone of you had the case when Open prices and Control Points have quite nice growth of equity vs Every tick has huge drawdowns for the same strategy?What do you do in this situation? Is it reasonable to update the EA to work only on new bars/ once per bar etc?
Strategy works on H1 timeline.
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
If you do not have an account, please register
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.