MQL4 and MetaTrader 4 - page 13

To post a new topic, please log in or register
Hi friends, I'm writing a code in my EA to export the opened orders data from my trading account in a single CSV file. Through the OnTick function, with any new tick comes, the EA checks the file to see whether a newly order has just opened or not, and if there is a new opened order that has not
I tried to download the MT4 setup from this link https://www.metatrader4.com/ But every time it downloads the MT5 setup. Setup file name is also mt4setup but after the installing it's MT5. Can anyone explain this
Hi, Im a newbie trying some simple programming.. Hope some kind souls can pardon my ignorance and give some advise.. Trying to plot a line that is a sum of 2 SMA output.. Tried using the code below.. can anyone advise how to rectify? thanks! #property indicator_chart_window#property
unfortunately I have not found yet the right way how to do this but at least i found a detour if anyone has a direct way to do that i would be grateful the way i found is by forcing the terminal to save the data through opening the folder that contains the log files #include <WinUser32.mqh>#import...
I wanted an EA that will contually make a profit whether its an uptrend or a downtrend and to make the profit whether the candle is bullish or bearish. Now the problem is as soon as a candle opens on order opens as well depending on whether its a sell or buy and with each new order comes the
Hello traders I am new to MT4 and this forum. Having problem with Detailed Report GIF chart, which is inserted into the actual report. The chart has the horizontal and vertical axis cropped, so it's difficult to see the corresponding values. I have generated the Detailed Reports as an Excel, HTML
Hello I have a very simple EA with an alert only. Here is the code: void OnTick() {//--- //Test if (Close[1] < Open[1] || Close[1] > Open[1]) //Test { Alert("Test"); PlaySound("email"); } } This code is just to test the Alert and Playsound
The MACD in MT4 draws the signal line as a histogram - why when the the rest of the world draw 2 lines is beyond me. Also, the signal line is computed from an SMA not an EMA. Anyway, I downloaded Traditional MACD that corrected these problems - only to discover that when I call iMACD() there is a
No news feed even enable news button checked. Just downloaded mt4 for pc windows10 3 days ago, nothing altered, terminal shows news column but always blank. Please help
hi can someone help me modify an EA im using. It deletes all objects when i change time frames or adjust the settings. I cant code so i need someone to modify the code and delete the "deleteallobjects()" part of the code/ <ex4 file deleted>
Hi everyone, I have a problem with MT4 installed on MacBook Pro. Windows are freezing because they are created outside the margin of my second screen. Any help? Attached some picts of problem
Hi, i have one multiple horizontal line indicator which able to plot 10 or more horizontal line in the chart.my problem with this indicator is i can't choose the color thickness level. The creator fixed permanently to 2nd level thickness which make me uncomfortable in the MT4 chart.Please help to...
Hello everyone, I will be really appreciate if you can help me to draw lines when diverges appears in the prices chart and indicator it self combine
Hi all, I'm creating an EA which call's one of my custom indicators and i want to open positions when the indicator gives me arrow signals. The problem is my EA is opening buy positions on both arrow's. I'm going to leave my code here with the hope that someone more experience could help me! Many
Hi, I am trying to write my first MQL4 algorithm but it doesnt work as i expected :) My basic algoritm will work on CHINA50 and it needs to do; When price moves above moving average for 30 pips, go short and take profit 12 pips, stop loss 20 pips When price moves below moving average for 30 pips
I am working on project where i have All EUR currency, and i need to find another price from EUR Example: There are two currency that values I have EURUSD and EURAED. I need to find USDAED, Formula: EURAED/EURUSD = USDAED But the close price must be equal or between HIGH & LOW prices but after
I am using the following code to draw an arrow, how can I tell which candle the arrow object is drawn on? void OnTick() { for(int i = 0; i < ObjectsTotal(); i++){ string name = ObjectName(i); if(ObjectType(name) == OBJ_ARROW){ if(ObjectGet(name, OBJPROP_COLOR) == Red){
Because I can't compile my code when I use this expression below, I always get the error ('.' - unexpected in macro) #define FXT_HEADER.size 728 #define FXT_HEADER.intSize 182
Hi, I am developing an EA using ichimoku indicator with Alpari historical data and its all fine. But when I tried to use the EA on Oanda and the results varies slightly. I suspect is because their feeds have weekends data included and that messed up the ichimoku lines. I thought about a couple of...
I am working on compiling codes and have come to a bit of a loss when it comes to these 4 lines. am I just writing it an older way? do i need to define with an enum? double LOWWeekly = iMA(Symbol(),PERIOD_W1,1,0,MODE_LOW,PRICE_LOW,0); // line for lower code
I have a button when clicked will create an immediate or pending buy order. I have a function that determines whether the order should be a buy if the current price is within +- 5 pips of the entering price that is inputed by the user. If the entry price is greater than +- 5 pips of the current
Over the last 2 years I have posted on a number of forums trying to discover why the platform freezes when selecting"Indicator List" or "Object List". I have not received any valid answers. There have been only a few kind suggestions from only a couple of others who have experienced this, but none...
hi i want to test an EA on a cent account with 1000 'real' dollars, so 100.000 cents. I wonder: when i want to test in the strategytester, what do i have to put in as balance? i guess 100.000 usd? Kind regards, Ronald
Hi all, Could I ask your help on a question regarding backtest? Say if I have a trade history list from a signal in text form. I am backtesting using trade simulator from FXblue but need to manually enter the trades and it gets tedious after a while. My question is if there is any other way to
I need a sample code that connects to the google database in real time. Who can help me
Hello, I have a problem with creating offline charts. MT4 PeriodConverter nor any period converting indicator downloaded from the internet is not creating offline chart. I tried everything, also reinstalling MT4. Is there any common mistake.. or known bug
Hello I just started creating my own EAs. Very exciting stuff. But I've got a problem. After I am stopped out, I would like all EA activity to pause until the next bar opens. What's happening is that once I'm stopped out, my other order is triggering instantaneously. I don't want this to happen. I
hi guys hope doing well my ea does not open any position in some broker ! why? can onyone help me to solve this
It was working all well, until today i am not receiving any notification from the terminal. I've reinstalled the app. Double checked the Metaquotes ID. But still not working. I tried with MT5 and it worked. My phone's model is Oppo Reno 2. Can someone give me a clue
Hi, I am a beginner in writing EAs with MQL4 and I encountered a question that confused me. If I send an order of AUDUSD pair like the following: OrderSend(Symbol(), OP_BUY, NormalizeDouble(lot_size, Digits), Ask, 3, 0, 0, "LONG", MAGICMA, 0, Green); How could I know whether the market order has