MQL4 and MetaTrader 4 - page 34

for (i = total - 1 ; i >= 0 ; i--) { if (! OrderSelect (i, SELECT_BY_POS, MODE_TRADES)) continue ; if (OrderCloseTime() != 0 ) continue ; if (OrderSymbol() != _Symbol ) continue ; if (OrderType() != 0 && OrderType() != 1 ) continue ; if (OrderProfit() > 0 ) { bool closedOK
Hi, it's an old problem but still not really solved. Recently I was in trouble with a new broker and its Gold-price: 1234.340! For a 5-digit-broker 1 Gold-pip should be 0.1 = 10 Points now here 1 Gold-pip is 100 Point - sigh!! So I thought to calculate a pip (and digits) from the value of the...
[Deleted]
Hi, I'm not a good programmer. Please help me for this indicator. 1) Highest high of N period - N2 2)Lowest low of N period + N2 so inputs are two values: N for the highest high and the other N (N2) many many thanks in advance
I have a few EA's installed on MT4. When loading them on a chart they visually are small and button are on top of each other. The EA shows a sad face so I am not sure if this is a config issue or what
I am back testing with Renko charts and although some pairs work just fine for some reason other pairs open one trade then immediately close it and does not trade any more after that. The error I get is: "tester cannot calculate prices". I do not think that this is a bug with my EA as it works fine...
Hi guys i have create a function for read inifile , it work perfect , but i notice the performance when load a inifile , is very slow , i think if the demand of iniread i assign at external dll , increase performance or the problem is when load in array a data read? if someone have experience about
Is there a way to determine whether the process of toggling history visibility in GUI is complete and OrdersHistoryTotal() returns the value equal to what is visible in GUI? I need to do some calculations on the whole history at the beginning. Since I don't know what range of history is visible at
As you can see on the pictures, i've coded a script that buy when SMA CROSSUP and SELL when SMA CrossDown. However, when i launch the backtests, it first launch 200 trades (BUY or SELL Depending on conditions) and then,the code executes normally except that I then end up with 199 trades which remain
Hi everyone, I'm new to this forum and new to creating an ea. I'm an aspiring mt4 ea maker and I would like to know how to make an ea that takes a trade after my two signals are met. my sample is . when first ema crossed(sample value200 and 100) happens wait for another ema to cross(sample value 80
Hi i have a indicator that scanner some cross if the param is correct i want push over one button and open a new chart with a template , and insert one EA with option , and indicator with option , is possible do that ? i saw the function ExpertRemove but not a function ExpertAdd thanks at all
I want to know that how may I know my order is closed by stop loss or not? Can anyone help?Thanks in advance.......
So according to my 5 cents of knowledge, you can use the File function to connect an EA to an Excel (changed from .exe to .csv) and trade with it. My question is if I can update (or involve) the number directly in the Excel file while it already linked to or written (updated) by the EA For example
Hi, Im new to MQL4 but not to coding. In my EA I'm trying to make a specific chart the current chart. When I activate the trading terminal it starts with a particular chart - EURUSD. This is not the one I want so I open a new chart (GOLD.) . At this stage _Symbol is still not set to GOLD. I then do
I am developing software in multiple languages using code pages 1250 and 1256. Expecting to code in even more CPs in the future. In the source code in ME, all the national characters display correctly. The sources are saved in utf8. The problem occurs during compilation. Only characters from the
Hello I'm starting out in binary operations, and at the beginning I'm finding it very difficult, I need help configuring mt4, I signed up for ***, I operate with the *** broker, and I'm having difficulty configuring my broker on MT4, I've already watched some and I read some materials to see if I
double   faster = iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_MAIN,1), //MODE_MAIN            slower = iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_SIGNAL,1), //MODE_SIGNAL            faster_2 = iMACD(NULL,PERIOD_H4,12,26,9,PRICE_CLOSE,MODE_MAIN,1), //MODE_MAIN            slower_2 = iMACD(NULL,PERIOD_H4,12,26,9...
Hi all, I am trying to create a simple indicator, basically a MACD on the RSI. Calculating the RSI and the two moving averages is no problem, works fine. Subtracting the two moving averages also works fine. (When I change the script to plot the resulting array of the subtraction, it plots ok.) So
hello, I would like to run MT4 on a server that works continuously, how to do? I have already gone to the menu on the photo but it does not work
  what is "uninit reason 0"?  (11   1 2)
i tried to open an order using script but got this error "uninit reason 0". what is it? how to fix it? please help.
Warning to anyone. If you encounter the error "event handling function not found", it could be because your hard drive is full. Even after freeing 10GB of space, I was still getting the same error when trying to compile my indicator. So I restarted MetaEditor and now the source file is completely
ButtonCreate( long chart_id,CChartObjectButton &btn, int i, const string name, const int x, const int y) { if (!btn.Create(chart_id, "Sym_" +( string )i+ "_" +name, 0 ,x,y, 77 , 25 )) return ( false ); //"Button_"+name if (!btn.Description(name))
Hello; I'm new to MQL4 and am attempting to retrieve values from a web request function to be used in a separate trading logic function but I cannot seem to get the data out of the local GetRequest function. There are 12 data points downloaded and I am using two of them, labeled p06 and p11, which...
Hi there. I hope someone can help me figure out what is happening here. I have a function, inside a expert advisor, called "calculateHMA". It calculates the Hull Moving Average value for any specified candle on the current chart. It returns the Hull Moving Average double value for the specified
Hi everyone, I'm developing an indicator and as soon as I started developing it, I left the indicator running for 3 hours and the chart appears like this. How can I solve? I've had the indicator for some time and only recently has it been like this... I don't really understand the problem but I
hi, i am looking for a script which can set a buy stop and sell stop 10 pips away from the market price and should have sl at 20 pips. can anyone please help me out here? thanks a bunch. regards, james
Hi, Can anyone help me with understanding how to get the value from iFractal please? It returns type double which I assume to be the price of the fractal but I'm just getting 0? The logic seems sound, so I'm assuming it's my misunderstanding of iFractal. My current code
Hi , When entering a price in a textbox, when I use DoubleToStr and set it to 5, it correctly truncates the price if it is formatted as a number, followed by a comma, and then 7 digits. However, if a price has 4 digits before the comma and then 8 decimal places, it truncates the five decimal places
What can be the reason of this cannot refresh history, 4073, and the EA have no acsess to the Time[0] from OnTick() function? For the many years and a lot of EAs created I have never meet this error before, when array out of range at Time[0]. Also, I have read this post, about that how to catch
Hi I understand the max terminals for MT4 per user is 32. The server I run is very powerful and can easy run 100+ optimised terminals across multiple users without too much issue. The question, will running 150+ terminals of the same EA across 7 users (max theoretical 224) cause any issues like
Hey gang. I've been struggling for a couple hours to figure out why iCustom in my EA isn't pulling data from an indicator I just coded up. The indi is working properly on my charts, but within the EA it's only outputting a value of 0 no matter which buffer I try to access. I've tried different