Expert Advisors and Automated Trading - page 126

  Help With Array  (1)
Hello, I am working on being able to input an array of values into a moving average function to be able to create an MA of any set of data basically. But before I get to that point, I am trying to improve my knowledge of arrays as I feel under-developed. I am simply trying to put the Ask value into
I have plan to Handle scenarios may cause Expert malfunctioning. This is Error codes may return in the run time. However, I want to handle these errors and some may not even Return errors. I made this topic to be a start point for something big and every one who is willing can contribute. I will
Hi Can anyone help to initiate trade when price is above MA and high of three bullish candle breaks
i am trying to figure out how i can replace these call functions in my EA so that i can submit them for mql5 market. i am new to coding so i know the easy way of doing it by using user32.dll then it allows me to A) close trades or B) turn off EA trading in total The ea i am building is for Trade
bool MarketClosed() { bool closed= false ; MqlDateTime STime; datetime time= TimeCurrent (); TimeToStruct (time,STime); datetime date_from, date_to; bool session_exist= true ; uint session_index= 0 ; //--- get over all sessions of the current day while (session_exist) {
I bought an excellent mt4 expert, it works very well in the moments in which the trend is not very directional but when there are certain periods with very strong trand in a certain and constant direction it must be stopped otherwise it goes into OTM. I would like to know if there is a way to stop
Hello, So, when the price gets to your limited order price , but the limited order is not executed. Every day I see a few of them. I am assuming my order is far back in the book queue and never gets a chance to be executed. But, how do you handle this condition in your EA ? I see some options: 1)
  Indicator to EA conversion  (13   1 2)
Hi, I've written an indicator that works pretty well when I need to trade and want to convert it to an EA. Clearly, the indicator is using the OnCalculate event and the EA the OnTick event.  However, when I convert my indicator to an EA it doesn't work as I the original indicator does and I...
I've been trying to code my strategy into an EA and i use all symbols and all timeframes when using my scalping strategy, i've been trying to do the same with the EA and end up with some error, i am still a little new to coding and my code may be completely wrong but someone help me out. If im using
HI, I'm a newbie. If I purchase an EA, can I install it on several MT5 on the different computer? All the MT5 will be logged on to my mql5 account, btw. Please help. Thanks
Hello, I'm currently developing support for multiple Symbol experts and I'm facing the following problem: Given the expert is attached to a chart, the documentation for OnTick says: > The NewTick event is generated only for EAs upon receiving a new tick for a symbol of the chart the EA is attached
Hi, I have a few newbie questions about charts. When I look at the chart of an EA I want to buy, on the X axis is shown number of trades. But what is shown on Y axis
  _rdb_The Best Free EA  (3394   1 2 3 4 5 ... 339 340)
Hello all, I open this thread because I create some EA and want to share it for free and unlimited to all of you. I choose TSD forum for place to share it because first time I learn MQL and all my knowlegde about MQL language begin when i read tutorials on this forum. First EA will be discussed is...
Hi all Please could someone assist with the code required to ensure that only one buy/sell order is executed per candle? Many thanks Sam
Hello Friend, I am new to mt5 . I am learning mql5 coding. My EA works like this ----------------------------- indicator RSI(14) Buy = RSI  cross 30 from  bottom Sell = RSI cross 70 from top I need help to develop a code 1)  open buy position if there is any buy signal and close if any sell position...
Hello, I am writing an EA using the MT5 Python library ( https://www.mql5.com/en/docs/integration/python_metatrader5 ) I have a working EA, however some of my trades do not close. It usually fails with the comment "Trade Failed Due to retcode: 10009, with comment: Request executed". This usually
  price close  (2)
I want to add some features in my robot. I just want bar closing code. Is it enough for me to write iclose? how should i define it? can you help me
Hey, I would like to sell an EA on the market. But I have a question, the pannel of the EA show my logo. This logo is a picture and need to be add to the picture folder of MQL5. But how it’s going to work if I want to sell this EA on the MQL5 market ? We only have the possibility to add a .exe Thank
Hello, I want to build a function to determine if we are currently trending or moving in a range. My idea is to compare the close price of the last 100 candles to an EMA Value of the close time. Is the close of the last candle higher or lower than the EMA value of the same sift value? Compare Close
In MT5 strategy test, the FileOpen() function deletes the files.  Why is this happening and what is the solution, please? handle=FileOpen(FileName,FILE_CSV|FILE_READ,',');
Hi Guys, First post here! I am writing an EA using the MT5 Python library. I am writing it directly in my python editor (PyCharm). https://www.mql5.com/en/docs/integration/python_metatrader5 So far, I was able to connect to MT5 and able to send orders as long as they are "ORDER_TIME_GTC". However I
The EA can be optimized but not added to the chart for trading. Does anyone know why
I'm trying to validate my ea. In Automatic Validation state, I'm getting errors as if I'm installing the moving average expert advisor. I also tried uploading the previously accepted code and still got the same error. I guess Automatic validation is trying to test its default moving average ea even
  Broker time  (4)
Hi there community, I'm about to share an advisor through the market. My broker works at GMT+2/+3 and the advisor is intended to work through this server time, so the question is: How could I set the advisor to work properly through an asian or american broker, which server time do those brokers
MqlTradeRequest trequest; MqlTradeResult tresult; trequest.action= TRADE_ACTION_PENDING ; trequest.type= ORDER_TYPE_BUY_STOP_LIMIT ; trequest.volume= 0.2 ; trequest.price=Ask+( 10 ); trequest.sl= 0 ;
#include <WinUser32.mqh>#import "user32.dll"int RegisterWindowMessageW(string lpString);#import //+------------------------------------------------------------------+ //| script program start function | //+------------------------------------------------------------------+ int start() { //---- int
  Adviser Ivan - the best of ilan  (90   1 2 3 4 5 ... 8 9)
The Ilans are already worn to a crisp. And that's why it's time for the Ivan series EA. This is a public attempt to write an EA taking into account the lack of Ilans. Next is going to be
Hello, I'm new to the community but like it thus far! My question is this: can anyone suggest where I may go to find (or have created) code for an Inside candle strategy? I see on the tutorials how to set up Bullish and Bearish engulfing strategies, but IC is kind of like the opposite and CANNOT
Hi everyone! I've been noticing something in my backtests. The problem is that, in real market, when the price (Candle High) touches a Sell Limit price, the order is not executed instantly, as the order is in the Book and so there's a Queue. But, in the backtest (using "every tick" modeling), if the
I have a strange problem: I have created an EA that I would like to test on a few different pairs. I have tested this EA on severals pairs in the past (the All Market Watch Symbols option) and it always worked. Today I want to test it again on several symbols but the whole optimisation just doesn't