Expert Advisors and Automated Trading - page 40

To post a new topic, please log in or register
Hello again mql5 community! Im back with another question im hoping someone has the answer for. I am trying to make a "scanForOrderModify" function that will add SL and TP when a BUYSTOP or SELLSTOP order is activated. This being my first time using pending orders instead of just market orders.......
Can we operate Terminal alerts set/get by mql4? I'm not talking abou this: https://docs.mql4.com/common/alert Talking about this which we can do on chart by right clikc on in tab "Alerts". If not, I'm sugest to do this. Need some scripts to delete all, I often have trash here or want some managment...
@MetaQuotes Software Corp. There is many cases that I want see 1.0000 or 1.0 in in IndicatorDigits and Comment but MT4/5 doing NormalizeDouble that omitting zero.
I'm running some tests and the stop loss value keeps changing. Why does it do this? Is it meant to? So when I check through a test report there are some much greater losses on individual trades than the S/L should permit......
I have a custom symbol based on D1 Nasdaq data from Yahoo finances (exported MT5 data here: https://1drv.ms/u/s!AkWFtUMYnskYjqkzdhvArjI2aLlsPA). The issue is that the Strategy Tester MN1 chart is different from the terminal MN1 and hence my signals activate a little differently and more importantly...
I'm trying to move my VPS from an MT5 account to an MT4 account with the same broker. I tried going to the VPS list and selecting move from the settings menu but it doesn's seem to be working. Am I doing something wrong or is this allowed?
Hi, My apologies if this has been addressed before: Print(SymbolInfoDouble("EURUSD",SYMBOL_POINT)); is returning le-05 Print(SymbolInfoDouble("GBPJPY",SYMBOL_POINT)); is returning 0.001 which is correct I cant understand why EURUSD and GBPUSD etc all return le-05? MT5 version 5 build 1940. Any help...
Hello, I have a problem with a function for partial order close, with a loop in it. Outside the loop i set a variable closed_volume =0, so the idea is to store the amount of closed lots , so that it may equal the previously set lot size for close - vlm .But what happens is when i run the loop once,...
Hi I try to test Telegram example from article: https://www.mql5.com/en/articles/2355 an get error message: "'SendPhoto' - no one of the overloads can be applied to the function call Telegram_Bot_EA.mq5 117 24" where is the problem?
When I click on the signal's subscribe button, it launches MT4 on my PC. So, the whole subscription process is initiated on my PC. Will the signal immediately go live on my PC? I'm guessing not. I presume at this point, I can 'subscribe' to a VPS (it will be the one here at MQL5.com). And it will...
I wonder if there is a problem. What can I do to get the full 10? With regards, Martin
Please can some add close % of lots when profit hits a certain target in pips to this EA! Struggling to find out how to do it. Code Below //+------------------------------------------------------------------+//| EM.mq4 |//|...
Hello, I have a strategy in which I have a few filters I am using, namely OsMA, Stochastic, RSI and CCI. Apart from the parameters of each indicator, I have on and off inputs for each one of them: input bool use_osma= true;input bool use_sto = true;input bool use_rsi = true;input bool use_cci =...
Hi Guys, I'm using MT4 Build 1090, Here's the problem: this is the default EA installed with the software, it will Open Short (SELL) trade when the price is is LOW! and Close Short when the price is HIGH, thereby trading a loss.. irrespective of the parameters used. It does the same when trading...
HI all. Just recently converted to MT5 to use multi-pair strategies. Currently trying to write a currency strength meter indicator that looks at 28 pairs. At present, the only way I can make Bars("XXXYYY",PERIOD_CURRENT) work across all 28 pairs is to open all the relevant charts using...
Is there a plugin to calculate the size of the position automatically using the One Click trading or an input via the keyboard (or from a signal)? I manage multiple accounts with different risk, in each one I have to see the lot manually and it makes me lose a lot of time (I do it from an Excel...
Hi, I downloaded EURUSD M1 historical data and imported it on a custom Symbol. When I try to test an EA on it, I get several 10044 errors opening positions.  2018.11.07 19:02:51.499 2017.08.01 15:40:00   failed market buy 0.01 EURUSDh tp: 1.18944 [Only position closing is allowed] 2018.11.07 19:02...
Trying to get this EA to take a % of order once it hits a certain profit, all it seems to do is to take the Pips Above Breakeven as set and nothing else, any help would be greatly appreciated Thanks #property copyright ""#define RUNS 20#define SLEEP 1000enum ENUM_TIMEFRAMES_MY  {   //None    = -1,...
I have a question, as I am quite new to all this. I am trying to back test an EA before I put some money into a real account to open, however in running the Strategy Tester with the EA it won't open any lots, saying that 'Lot is less than the minimum. Order will open with minimum lot.' However, I...
Hi     I have been trying to modify this bit of sample code for use.  I keep getting the Invalid Price error. Does anyone have any ideas   Thanks double volume=0.1;   string symbol="GBPUSD";    // specify the symbol, at which the order is placed   int    digits=(int)SymbolInfoInteger(symbol...
We have tons of EA's around, but never with a smart SL and TP. My point is simple. When we place a trade, to place your SL you'll do one of these two options: Use support and resistant previews levels, or.... chose a number of candle (e.g. the last 5 or 10 candles) and pick the lower low (in case of...
Hello Everyone. I'm new to MQL5 but there's something I wanted to create as a very basic rule, to then test as an automatic trade robot in a particular currency or stock. the code is quite simple and in a way i can make it in excel and sql: (assuming I'm only considering this to be executed at every...
Hello, after updating Metratrader for build 1940, one of my thefts that uses the following includes; #include <MT4Orders.mqh> #include <Math \ Fuzzy \ MamdaniFuzzySystem.mqh> #include <Math \ Stat \ Uniform.mqh> #include <Math \ Alglib \ dataanalysis.mqh> started to return a strange double...
Hello, Can anyone help me please complete uploading my EA, my problem is the last part which is automatic validation. Error says "there are no trading operations" but it is not a trading EA. only my EA is for drawing horizontal line or ray. Does anyone know what to do?  Thanks
Hi, Backtesting via the Strategy Tester reports the following drawdown variables: - Balance Drawdown Maximal - Balance Drawdown Relative - Equity Drawdown Maximal - Equity Drawdown Relative If I want to avoid a margin call of 50%, which indicator should I pay attention to? Thanks
Please Help Please advise this error suddenly appeared. Is there a way to disable auto update ? RE 2 16:30:52.832 AiFetchV2.03 (EURGBP,M5) Access violation at 0x0000024A29BF7215 read to 0xFFFFFFFFFFFFFFFF in 'C...
hi guys i have problem in my program i check 5 times but i cannot fixed who can fixed this error ? //+------------------------------------------------------------------+//|                                                         ADX3.mq4 |//|                        Copyright 2017, MetaQuotes...
Hello, I do not know how to program either mt4 or mt5. However, my strategy requires that certain tasks be automatic. I need an EA that closes all orders (open or pending) if one of two previously set prices is reached. In my head this seems to be a very simple code, but I needed to first test one...
hi, I was wondering why my file (Test.txt) get deleted when i try to read from it using FileOpen. here is the code : int OnInit()  {      int h = FileOpen("Test.txt", FILE_READ|FILE_ANSI|FILE_TXT);      if(h == INVALID_HANDLE)         Alert(GetLastError());      else...
Hello, Please help me find a solution to get the slope/gradient of MT5's regression channel object extending over any number of bars that I've specified.