MQL4 and MetaTrader 4 - page 317

  PSR as exit  (4)
How to code this think I am trying this for last one month I am not expert level I am on learning If the PSAR trend is changed to positive to negative my Open buy positions will close and just opposite in case of sell Do I need to use switch case or just I can do with if function Thank you in
Hello Forum, I am writing a function in MQL4 where I want the lowest array of an RSI to be lower than a number I define. There is no error when I compile it but it won't execute. These are the errors I get from the Journal. 2020.04.28 06:55:22.813 2019.11.05 00:00:03 Testing pass stopped due to a
Starting today, when i save code i can no longer read it outside of MetaEditor. It appears garbled/empty when looking with a text viewer. My back testing system can no longer read from the code to configure the tests to run. Has anyone else seen this? version 5 build 2302 24 jan 2020
Hi, I have a 2d-array and want to get the max value of each column. The ArrayMaximum()-Function is for 1d-arrays only. In the picture you can see an example. The numbers are stored in an 2d-array. In TF5 the highest number is 71. Is there any function in mql4 to get to this value? I've looked over
Hi, So I'm working on this simple script, that reads through a txt file, where each line is in the form of " AUDCAD . 0.9076 a", so the pair, price and a letter meaning (a)bove or (b)elow. I want to use it as a price alert script. I manage to read the file, get the pair, compare it with MarketInfo
Dear all, I wrote an EA that allows a total of 5 trades to be opened at one time. However, I only want one trade to open per bar although not necessarily at the beginning of the bar. Therefore, the code written here (https://www.mql5.com/en/forum/216567) or similar variations does not work for me. I
Hi all, I've got an include.mqh file with a few useful functions that I'd like to provide to some people. However I don't want to disclose my source code as it took long hours to do it. The idea is for them to include my file like: #include <coolfunctions.compileExtension> function() {
[Deleted]
Hello, I'm trying to add Martingale to my EA, from another file that defines lots. But I researched and I couldn't solve a mistake, forgive me because it seems simple, please help ... EA code: #property strict#include "SetLotSize.mq4"#define MAGICMA 20050643extern int Frames=2;extern int
  this is weird  (1)
hi guys i have coded this ea and it work fine to some dgree m i been trying for the couble of days to figure out what is wrong bur i cant find it m i tried using some print statment in attempt to find the error but no luch , i dont even get ordersenf error or somthing from this sort to even start
I have an ex4 indicator that I downloaded, I would like to create notifications for this indicator when I have a signal (Up or Down). On Data Window I noticed that it has 4 Parameters and these only show values when mouse is hovered on a specific point of the indicator in the bottom Window. Some of
  Very easy to solve for you  (13   1 2)
hello everyone first of all thank you for read my post. I have faced one problem. I am creating custom indicator that buffer[] takes value of 1(for example buffer[i]=1) when moving average is increasing. I wrote code but this error appeared "SetIndexBuffer-no one of the overloads can be applied to
How to do it? It is possible? Best Regards
Can anyone assist me patiently and kindly? I' am new to Forex and basically just learned the pips thing, not even that well! I've just opened an account with Blueberry Markets and using their MT4 Platform for Demo but want to add their EA (algorithm auto trader) on to my Demo account so I can see if
Hi guys. I am trying to calculate and draw RSI for each currency using RSI value if seven pairs of that currency. But It keeps drawing straight (Horizontal) RSI lines instead of wavy lines. Can anyone tell me where I am wrong with this code? 
  Expert Advisor and Indicator  (13   1 2)
Hello, Would You help me find a way to: Read with Expert Advisor a Alerts? Best Regards
Hi guys,  I am trying to figure out how to flush out, or 'reset' indicator buffers on a keystroke event. Here is what I have so far   void OnChartEvent(const int id,         // Event identifier                    const long& lparam,   // Event parameter of long type                  const double&...
  Something changed!  (12   1 2)
The code below used to give me the Average Daily Range (ADR) before but now suddenly it does not work anymore and keep on giving me the value of ADR = 0. Can anybody help me to solve this? for(i=1; i<=20; i++) ADR = ADR + (iHigh(NULL,PERIOD_D1,i)-iLow(NULL,PERIOD_D1,i))/Point; ADR = ADR/20;
Prompted by the new article at https://www.mql5.com/en/forum/127024, the attached files are an example of sending messages asynchronously between different instances of MT4 on the same computer, using named pipes. Inspired by the MT5 article, but there are some major differences in the methodologies...
I need to convert this function from MQL4 to MQL5 I can't understand how to insert the two moving averages for the correlation calculation. The items Symbol1 and Symbol2 are variable, since the correlation is calculated on six Currency where Symbol1 is fixed and Symbol 2 is variable. How will I have
int OnInit() { return(INIT_SUCCEEDED); }void OnDeinit(const int reason) { for(long chart_id=ChartFirst(),i=0; i<100 && chart_id!=-1; chart_id=ChartNext(chart_id),i++) { ObjectsDeleteAll(chart_id,"prefix"); //ObjectsDeleteAll causes hang during recompilation when calling for other chart
[Deleted]
  ELD code conversion to MQL4  (18   1 2)
Good afternoon. Could you please help me convert this code ELD (TradeStation, Multicharts) in MQL4. my level is not good enough to do it, but yes you can be? thank you for your help. friendly   {         XCAP_iPolyFitPredict:                   Uses a fit to polynomials to create a least squares best...
Hi, can anybody help me with this code? It gives me an error OnCalculate function, I'm trying to create an indicator in Separate Chart, that shows an Stochastic and EMA/SEMA at the same time. Here is the code
Hi everyone. I need to use one fuction, but with a varible numbers of parameters , the quntity of parameters is known in advance. In C++ for example, you use kind of void func(int a, int b, ...) and it's simple. But unfortunately I havent found any information about it in MQL4. Any tips, how to do
I observe unsystematic crashes of MT4 (latest version) when attempting to open the market tab from the terminal window (for exmaple, to run updates of EAs). I have two VPS servers in different data centers. One each, several installations of MT4 from several brokers, and 3-4 MT4 instances running in
Hello, I have configured a Telegram Bot in order to send my trades notifications from MT4 to my Telegram channel through an Expert advisor but I am having issue which is my bot in Telegram is sending the same message multiple times until I cut the EA. I tried to modify the variable msg.updater in
Actually, it's putting 2147483647 in front of what the actual indicator value is. Can you help? I can't figure it out. My code below is for MT4. NOTE: I've number 2147483647 is significant because it shows up when you max out the "Max bars in history" or "Max bars in chart" of the MT4 Options Chart
Hey. I will ask for help . Why compiler print "OrderModify" should be checked ? //+------------------------------------------------------------------+ //| USDPLN expert pozostałe .mq4 | //| Copyright 2019, MetaQuotes Software Corp. | //|
Hi, when plotting say a MA for example, the EUR/USD, it returns the value as 1.xxxxx (5 digits). How can I increase that to say 8 digits - 1.xxxxxxxx? Using this in a MA slope EA. TIA
How can determine the total profit of all currently opened orders in mql4
Can anyone help me know how i can open an order that gives a 10 profit when using a EURUSD currency pair