MQL4 and MetaTrader 4 - page 268

Ideally, I would like to end up with an array like [(O,H,L,C) 0 , (O,H,L,C) 1 , (O,H,L,C) 2 ... (O,H,L,C)n] where every tuple represents a candle and n=periods, n defined by me
hi.i have a question! i wanna start to create my own expert and if i run expert and close mt4 , do the expert works
Hi I need to recognize if the symbol belongs to fx, CFD or Futures. Should I used this? MarketInfo( _Symbol , MODE_PROFITCALCMODE) Is profit calc mode the correct way to figure it out? Please note that I want to do it programmatically. Any help would be appreciated. Added later: Let me explain more
I know the documents have everything I need to know. I even have the "Expert Advisor Programming for MetaTrader 4" book. The problem for me is just that I have no programming experience before this. So, I can manage with these resources but it's a real struggle for me. It's basically trying to learn
Is there already a solution to automate these: right click, save picture as, active chart (as is), save into IIS image webfolder where I can open from phone's web browser
Hi, Appreciate if anyone can help me modify EA code below to play sound/alert ONLY when iSAR value transitions from below the bid price to above the ask price and vice versa. Thanks, Alfie. void OnTick() { string signal=""; double MySARValue = iSAR(_Symbol,_Period,0.02,0.2,0); if
I set EventSetTimer() to 1 which means onTimer() functions is called at every 1 second. Now I am wondering what happens if onTimer() function takes more time than 1 second to execute
I'm using this code: #include <Arrays\ArrayObj.mqh> template < typename T> class CVector : public CArrayObj { public : T operator []( const int index) const { return At(index); } }; from the end of this article: https://www.mql5.com/en/forum/34637 But when I compile it I'm getting the error
Good Morning! I am trying to put an EA on the market, but the validator does not accept it. In addition, the validator does not say the cause of the problem. The only error message is: "test on EURUSD,H1 there are no trading operations test on NZDUSD,H1 there are no trading operations test on
I cannot find any code that will give "focus" to by ChartID If I have 4 charts open I would like to give focus to 1 when conditions are met.. Can anyone guide in the right direction. I dont care if its a script, ea, indicator ,article or some forum discussion something I could use or figure out (no
Hi, We can get highest / lowest value of last Depth bar using (similar to MT4 Zigzag indicator) :  double theHighest = high[iHighest(NULL,0,MODE_HIGH,Depth,i)];double theLowest  = low[iLowest(NULL,0,MODE_LOW,Depth,i)]; But how can we get the highest/lowest of the CLOSE price of each bar in the last...
I am writing an EA that continually execute a function as long as a buy or sell remain true. For example if buy is true, the function will execute and quite. It will check again if buy is still true, if true it will execute again. It will continue the cycle until buy is false. I tried implementing
[Deleted]
#property indicator_separate_window #include <Custom\Function_BBIndicators.mqh> #property indicator_buffers 1 int History = 50000 ; double Buffer_VolumeIntensity[]; //+---------------------------------------------------------------------------+ //| Initialisation Function
Hi all, I do understand that much has been written on this topic, but I'm struggling to line up my exact problem with the rest of the problems and solutions covered already. I'm testing some EAs in MT4 using a set of .csv history files purchased online in June 2020 from a reputable source. I'm
Hello, I'm trying to add my EA to the marketplace. I am getting validation errors and cannot proceed to submit for review. When I look at the details, its only running the backtest for 3 minutes. My EA is NOT going to publish a trade in 3 minutes! So how does one proceed
[Deleted]
How to block an EA to work only in to determine actual I? Example Account: 202020
[Deleted]
Hi, I am struggling to solve the following problem:  I have many charts open on which I am running different analysis. In most cases, there is no action of visual check needed, but in some cases yes. What I want is to send an alarm sound, plus bring the chart in front. I have tried many user32.dll...
hi everyone, i am newly programmer in mql4 . i want to combine to indicator : 1:candle pattern:https://www.mql5.com/en/code/8621 and 2:DT_Zigzag:https://www.mql5.com/en/code/7266 in DT_ZigZog . is there any one to help me how to call candle pattern in DT_ZigZog
Hi everyone, I'm currently having some problems with the installation of an EA. I've downloaded the free EA "Martingale VI Hybrid.mq4" from Codebase. I tried to add it to MT5, but it didn't show up between my Expert Advisors. I installed it in the correct folder (AppData\Roaming\MetaQuotes\...) I
When i try to use Low[1] as stopLoss, i get wrong value
Here is a short Expert that creates a Dialog with a Button and an Edit box. The Text in the Button is set to 123 and the edit box is set to 789. I'm trying to maintain these values using GlobalVariableSet and Get functions. After loading the Expert and changing timeframes, under the TOOLS option on
[Deleted]
Hi, I have an indicator that I have loaded on different mt4 platform and worked well, but one of the mt4 platform doesn't load it, I can't load the indicator on the chart. Anybody knows why ? They have all the same mt4 version... so I don't where to check to make it work. Thank you. Burny
I will send 1 buy market order (No1) and 01 pending sell order (No2) at the same time. TP1 = 20 pips SL1 = 40 pips Openprice1 = Ask coment = "No1" Openprice2 = Ask- (SL1 / 2) * point TP2 = Ask-SL1 * point SL2 = Ask + TP1 * poin coment = "No2" There are 2 scenarios: - The price goes up and touches
Trade panel written by MetaEditor4 with its own Controls library will crash when "switching time frames", but the problem does not exist in mt5. Anyone got same issue
  Help in coding.  (2)
Hi everyone. Could anyone one please teach me how to control the number of the opened trades in my EA ? (please have a look on my code below) It is a 2 moving averages (not crossover) (it is above/below) using candle number 0, so when the fast MA is above the slow MA it opens a buy order straight...
[Deleted]
How can I test of a string is blank? For example: if( !empty(MyString) ) {  Alert("This string is not blank.");  }   
Hi, I'm totally new to coding on MT4/MQL4 and had a question, maybe a dumb one. I have a Portfolio EA which contains 100 individual EA strategies. It works quite well but each time I want to tweak the SL or TP, I need to change 100 lines of code. Boring. Is it possible in MT4 to set a variable to a
Greetings, i'm trying to write a code that ( at a indicator signal ) closes any possible, lets say, BUY orders and opens a SELL order in its place; also vice-versa. I've tried a few different ways, seemed to work when backtesting, but when looking at it on LIVE, the orders do get closed, but the new
extern string BrokerTime = "First Session"; extern string StartTime ="00:00:00"; extern string EndTime ="14:00:00"; extern string BrokerTime_ = "Second Session"; extern string StartTime1 ="19:00:00"; extern string EndTime1 ="23:55:00"; void start() { if(StrToTime(StartTime)<TimeCurrent() &&
Hi everyone..Sorry but i need help...i have ea which work very well on any pair like EURUSD ,AUDUSD,EURJPY, but the problm is the same EA doesn't work on ETF, so i want to what going wrong exactly. Does ordersend for ETF different? Somebody help me