Expert Advisors and Automated Trading - page 26

To post a new topic, please log in or register
Hi guys, I have been struggling adding a feature to my EA. I want to opposite open market orders on every trade at my SL level that get deleted once TP is hit. So basically, if I have a long position and the SL is hit, I want to go short at the same level as my SL. If TP is hit, the order gets...
Hello everyone! I need help :) How to implement this to an advisor. If ( 5 minutes have passed since the last position was opened )   Do this  Else    Dont Thanks for your interest.
Hi all, I'm looking for a solution, maybe someone knows about something... The ideal will be an EA that I can run everytime I open mt4. The EA then automatically checks a provided list of instruments if all the data (M1 to H4 for example) is up to date. The EA then downloads all new data from...
Hi, I purchased an EA and the settings are as in attached.  Seller of this EA is not responding for more than a month so i couldnt clarify. I want the EA not to open new trades if the no of trades reached 5 for a particular pair (EURUSD). Is the relevant parameter available in the settings list...
I would like to change an input variable value within the EA and show its changes value in the EA input mask. If a define a variable like a  extern int myvar = 0; then I can change its value myvar += 1; but when I reopen the input mask I got the same 0 value. Is that correct? I would like to show...
I am currently testing an EA which I have converted from MQL4 code to new MQL5 code. Things generally work but the lot size calculation (based on a fixed risk percentage) is off: double subGetLotSize (const string sSymbol, const double dRiskPercent, const bool bAccountIsMicro=false)...
Hi I need to read the first number from a file. The number is formatted in the file like this: 0.000000000000000000e+00 I don't want the program to take anything into account other than the first number (the first 0). My current code is: int ReadReceived()   {   int filehandle=FileOpen("modelout...
I purchased a Candlestick pattern indicator on the MT5 Market. I would like to capture the signals coming from this indicator to process them in an expert advisor but I could not read the data from the buffer. The signal appears as text on a specific candle, here is an example: I tried to contact...
When loading any EA to any chart (Demo Account) it shows the EA on the top right, but it is freezing my terminal. I cant click anything anymore and I have to force close it. I tested it with a few EAs from the market and with self programmed ones. My PC has enough power and MT5 is updated.  Please...
I get the error: 2019.01.02 23:58:00   PlaceOrder: error 4756, retcode = 10013  4756 : Trade request sending failed 10013: Invalid request Anyone an idea why this fails?? MqlTradeRequest req={0};      req.action      = TRADE_ACTION_SLTP;    req.symbol      = _Symbol;    req.magic       =...
  sar1=sar2 (2)
Hello, I need to change in my mq5 file one part of code. I have: sar_one[1]>sar_two[1] would like to test it with sar_one[1]=sar_two[1] Can it be done? Thanks
Hi all,I have a problem when i make a screenshot in mt5 from ea, into screenshot don't appear label,label BMP. How can i do to fix this? Thanks
I dont know if this is the proper way of indexing the OnCalculate() standard arrays (see image). Thks
I have rented a virtual hosting server from MQ5.  I have several automated programs running on this server. That morning 2 positions where not closed even tho i have the right settings. I contacted the maker of the EA and he stated that the only problem is on the VPS. I added 2 screenshots aswell....
as support staff respond take too long and i have only 2 days left for refund, need cancel payment of 1 ea what was deleted by mql5, so now i need refund, can moder write me and i will give him info about payment and what ea? because i have ticket opened 3 days and no one answer me on service desk
How can I get the ArraySize of some Symbol MqlRates? Tks
Hi, I am trying to place my SL/TP at the UPPER BOLLINGER BAND. if(Highes_ >BOLLYUpper)TakeProfit =Highes_           if (UseTakeProfit) TakeProfitLevel =  TakeProfit ; else TakeProfitLevel = 0.0;Ticket = OrderSend(Symbol(), OP_BUY, Lots, Ask, Slippage, StopLossLevel, TakeProfitLevel, "Buy(#" +...
Hi, I have an EA which is based on 3 steps. Once the first 2  steps satisfied i need to wait for the 3rd step to come along. Ideally i would wait 15/20 bars for the 3rd step to show up. The problem that i have is: how do i check for the last 15-20 bars if the 3rd signal has been satisfied? I am...
Hi all I'm looking for MT5 script or EA (possibly MT4) I would like that when candle a bar crosses the horizontal trendline i.e. when the close price are on the opposite sides of the line then close position. Does anyone know similar solutions? Please share with me. So far, just I found it....
Is it possible?‌ ‌‌Thanks D‌aniel
Hi All I have an EA which only works when I create first/initial buy or sell manual order. Can any one kindly let me know that how to back test that EA ? I could not find any first/initial manual order option in Strategy testing. Thanks Imran
Struggling trying to hardcode the formula for 5 day ADR into my expert advisor. Not sure what I'm missing but it keeps returning 0.  int dailyrange(){int i=0;for(i=1;i<=5;i++)R5=(iHigh(Symbol(),PERIOD_D1,i)-(iLow(Symbol(),PERIOD_D1,i))/Point);averagedailyrange = R5/5;return(averagedailyrange);}
Hi fellas. I want to know which is the best EA bot that you ever used? Thank you in advance.
I would like to validate EA input values (i.e min. and max.). Is this possible? I would like to enable some inputs based on the selection of one other (i.e. enabling one option would enable some other inputs). Is this possible too?
I open a limit sell order and limit buy order both with take profit 300 points above the one price. For example: Order 1: limit buy at 1.08000, take profit at 1.08300, no stop loss Order 2: limit sell at 1.08000, take profit at 1.07700, no stop loss What I expect is when the price oscillating...
The CButton class is derived from CWndObj, and CWndObj is derived from CWnd. All the classes don't have an interface to set BASE CORNER. If you set BASE CORNER by ObjectSetInteger OBJPROP_CORNER, then the coordinates is weird. This will make event handler to response false due to position miss. Does...
Something common, i am using latest metatrader 5, so i think its the last standard library, i want to create a limit order as soon as i create a trade to scale out half of position in 1:1. The problem i have its that everything is fine but for example if i am in a sell when it touches the buy limit...
We (The end users of Terminal.exe or terminal64.exe ) drive the demand for brokers to buy MT5 Server from Metaquotes. These licenses are expensive to buy and monthly fees are easily $10,000 USD. The "EA" Market is what took Metatrader into the #1 Spot of Forex. Now MT5 allows Hedging so more of us...
BULLISH/BEARISH Bar counter code Hi guys i`m having problem creating a bar counter code.Basically this indicator would be a statistical tool for me and it would help me very much with my market research. It would count how many  BEARISH bars appear and BULLISH bars at the next candle of certain time...
Hi How can I substract a value from the account balance? Simulate a withdraw while backtesting. Thank you