Expert Advisors and Automated Trading - page 17

i understand what the usage of ZeroMemory is. but then i see it was included on TradeRequest SL/TP modification . so, is it necessary to use it on pending order modification? because for each request-result action, the previous one will be overwritten right (cmiiw). all variables in my code will
I have been using AI to create custom expert advisor for my needs, I have provided code below for the custom EA that should send alerts to my telegram channel. There is no error in compilation. This ea sends initial message that "Alert system initiated" to my telegram which means that the API and
Hello! trying to make a VWAP indicator that will update the data based on a anchor point that is movable. Like a vertical Line will appear on the chart and from that line towards candle 0, prices are updated and calculated corectly. The problem that I have is with printing that VWAP line on the
Validation when publishing Expert Adviser I received a "Not enough money" error, how can I fix it? No issues were encountered in backtesting or live trading
Good morning, I have an account that I use to backtest strategies. I have a limit regarding the tester: It only tests 10K combination at a time and it doesn't apply the spread I want to use. I would like to change these settings but I don't know how to do it If someone know the way to changes thoses
Hi there, i'm not a coder and new to this, i am now trying to build an EA but keep getting errors in the below code but i have no idea what's wrong. is it a rare problem or anyone knows how to fix it? Appreciated for the help! //+------------------------------------------------------------------+
i have a take profit of " 150 " points but , I'd like to partially close a position if it get 50 points profits then modify the remaining position with a take profit ( 100 points) , here's my code the problem is that the position closes fully at 50 points , i understand why but can't figure out how
Hello, Sorry for the very noob question but I was trying to code with the wizard a VERY easy strategy => if price opens below and closes above EMA200 then take a Long. I'm able to set up the paramters with the wizard, but the only thing I don't see is where to actually tell the wizard/code that the
Hi, is there a way to copy a pending order? Without having to open a new order and input the details again. I know it doesn't take very long, but if there was a hotkey or etc to do it fast it would save a lot of time when you do 100's of orders a day
Dear traders, Since last week the FTP connection between MT5 and my Edgewonk keeps failing. Although my logins all seem correct, although I don't have an active firewall and/or VPN. Edgewonk helpdesk tells me they don't see/register any login activity from my MT5 server whatsoever. Although I work
I will publish Expert Adviser on the market. During validation, an ‘ordersend error 131’ is returned. There is no problem during live trading or backtesting, but how should I fix this error
Hello, I´m not the best in coding but I have a good base. I tried to code an expert adviser and figured out an issue I can not solve by myself. I tried multiple things and modified for hours but it doesn´t seem to work. Maybe someone has the right hint for me. So I loop throug all the candles on a
Hello I have the following code that calculates the open orders in a given Timeframe, but I don't know how to count also the pending orders. int TradeCount( ENUM_TIMEFRAMES TimeFrame) { int Cnt; ulong Ticket; long EntryType; datetime DT[ 1 ]; Cnt = 0 ; if ( CopyTime (
Morning I'm traying to publish my EA, and after local testing, i don't find any error. But when i update to market, verification process say: test on EURUSD,H1 (netting) 2020.05.05 10:06:00 failed modify #6 sell 0.3 EURUSD sl: 1.09088, tp: 1.08857 -> sl: 1.09075, tp: 1.08857 [Modification failed due
Hello I uses below function for calculate lot size in MQL5 for use simple OrderSend (symbol EURUSD_i and Alpari broker). double dblLotsRisk( double dbStopLoss, double dbRiskRatio ) { double dbLotsMinimum = SymbolInfoDouble ( _Symbol , SYMBOL_VOLUME_MIN ), dbLotsMaximum =
How long does it take for an update to be published in MT5? version 0.81 has been on the website for several hours but 0.8 is still available in MT5 I have already informed my users about the new version, but it is still not available for download. does anyone know how long it takes
I have written an EA (in MQL4) to test a strategy which involves placing a buy and sell pending order at the same price on a grid, with target profit, and once the orders are triggered, another pending order of buy and sell is placed at the next level in the direction of travel. I am not a
I want to use Multiple indicators each responsible for either CheckClose or CheckOpen() of standard library of ExpertSignal.mqh in the source of ExpertSignal.mqh there is parameter called m_direction in the Direction() function which works with a mask and another called m_ignore now that I want to
Hi there! I´m coding an EA which uses pending orders - i know that some people find that EAs shouldn´t use pending orders but it makes sense for my logic - and i want to modify its price depending on the last high/low. Im having trouble with the trade.orderModify parameters count. I´m using it the
Hi everyone, I hope you are fine. I am having a hard time with the following error. I get an error cancelling an already placed pending order due to invalid stops.... 2016.05.12 06:00:00 failed cancel order #226 sell stop 1.20 EURUSD at 1.14209 sl: 1.14462 tp: 1.13653 [Invalid stops] Why am I...
I've searched all the MQL5 market looking for an Expert which can do (Multiple Close By) with the ordinary closing actions like (close all, close pending orders, close only buy, close only sell, etc.) I didn't find a one that can do this important feature (Multiple Close By) I know that not all
Does anyone know why timeout whrn performing a webrequest is ignored? Looking the documentation ti says, timeout in miliseconds. Any value I use, 1000 (1 sec), 2000 or 100000, any value, it is always taken 10 to 12 seconds. Thanks for any input
Hi everyone, I have an odd question about something I have noticed in the strategy tester. I am using a bitcoin as my deposit currency (since I am trading BTCUSD and want to ensure my fees are calculated in btc). Next to the deposit section, there is a dropdown box with a value selection between 0
Hi all, I've read lots of conflicting information about this question so i'd like a clear and simple answer if possible. Are commissions and swaps taken into account during the MT5 strategy tester and optimization process? I see a column for commissions in my final backtest report, however it is
I am using MetaTrader 5 for python and regardless of the specified range, symbol and timeframe, copy_rates_range() almost always returns 0 or 1 bars. In the docs they say it's normal for the first call and that the requested data will be ready for subsequent calls but it just never is
i have some experience creating an .ex4 and .ex5 EA, but i have ZERO experience creating indicators. i never use any visual graphical object either to my EA. so quick question: 1. is it possible to add a custom indicators to an EA? 2. just curious, based on programing side: are indicators is the
I want to convert this code from mql4 to mql5. Please write the code for me. OrderSend(Symbol(),OP_BUY,0.1,Ask,5,Ask-(50*Point),Ask+(TP*Point),"My Comment",00018,0,clrGreen);
Hello and thanks for you time! I would like to me a question about the the OnTick function, the goal is to open 10 buy, then put 10 sell stop, if buy hit tp close the sell stop, if close sell stop open 10 sell, any idea how can i achive that? Like this now i can not beacuse all ifs stucks
test on EURUSD,H1 (netting) 2021.02 . 04 20 : 00 : 00 failed instant buy 0.05 EURUSD at 1.19607 sl: 1.19407 tp: 1.20607 [Invalid volume] 2021.02 . 04 20 : 15 : 20 failed instant buy 0.05 EURUSD at 1.19642 sl: 1.19442 tp: 1.20642 [Invalid volume] 2021.02 . 04 20 : 30 : 40 failed instant buy
#include <Controls\Dialog.mqh> #include <Controls\Button.mqh> #include <Controls\Label.mqh> #include <Controls\Edit.mqh> #include <Controls\CheckBox.mqh> #include <Controls\MyDialogApp.mqh> #include <Controls\RadioGroup.mqh> CAppDialog *MyDialog; void OnInit () { MyDialog = new CMyAppDialog; if