MQL4 and MetaTrader 4 - page 44

To post a new topic, please log in or register
Hi, I am new to the metaquote language and have problems with programing a trailingstop that works. Can anybody help me with the code. Mine is changing the stop correctly when themarket moves up but it also changes it when it moves down even if it shouldn't,this in the case of a Long position....
Hello friends... I'm looking for a way to save the entire MQL4's help page as a pdf just like MQL5's help page. How can I do it
Hi!  The following code is an example of metaquotes.  #include <Controls\Dialog.mqh> #include <Controls\CheckBox.mqh> //+------------------------------------------------------------------+ //| defines                                                          |...
Working with Mt4, but message in Terminal window reading WARNING Offset overflow 2179: period1. I have some settings in the EA to work with, but what is the root cause of this message
So it works fine with FXCM but not with Pepperstone. On Pepperstone only works with stop and limit orders but once the orders are hit the trade gets closed automatically for whatever reason... Is it possible that some EA work with some brokers and with other not ? <ex4 file deleted>
Does anyone have a break even expert that works with multiple trades on the same currency pair ? I tried breakeven EA v1.3 , 1.2, 1 and SL2BE ,and they work great with one trade but If I put another trade the ea doesn't treat them separate but as one trade. for example i place one trade ,goes in
Hi. I'm sort of new to forex. I have a question. Let's say I open a position; any position. There's an initial spread cost (ex. a spread of 3). Next, let's say I'm at a profit of +0.12; and now I decided I want to close myposition. Here's my question. Will my profit be +0.12 - the opening spread...
  Reverse Trade HELP (11   1 2)
Hey, The script is a simple EA that checks if a manuel trade (MagicalNumber == 0) closed with no profit. Ex: When a SELL TRADE has been closed with no profit, so I would like to open straight away (market price) a OP_BUY So I've added both way ("OP_BUYSTOP" && "OP_BUY") and only "OP_BUYSTOP seems to...
I am writing a basket trading ea, and so I am replacing the whole chart window with a custom user interface.  To do this, I have written an initialization function that removes all the stuff that the chart shows by default, so that I can start with a black screen. This works well, but I have not...
Hi guys, Im developer, but taking the first steps of learn programming on MT4. Really basic questions: Is the code C#? or what? What kind of IDE is used here? or is through Metatrader itself? Any guide or good "book" to check out? Totally lost here, where should i start? Thnks in advance
Hallo experts, few days ago my EA sent a pending (buy stop) order for EURUSD, see the blue line in the attached account history, that should have been triggered one or two periods later, the chart shows the price going up quite a bit immediately after, but it never was executed Neither seems it to
Hello i am new in MQL4 coding. I really want to create my own ea at MQL4. But there are some problems i have faced. How to generate array with (7,9,4) dimensions/with 7 rows. each these rows contains rows and 4 columns/? Each elements must be random from uniform distribution
Hi folks, this is my first post i hope the way i do it is ok. pls see my code at first: if( iStochastic(NULL, PERIOD_CURRENT, 5, 3, 3, MODE_SMA, 1, MODE_MAIN, i) > 20 && iStochastic(NULL, PERIOD_CURRENT, 5, 3, 3, MODE_SMA, 1, MODE_MAIN, i) < 80 && iStochastic(NULL
I'm trying to automatically scale the price range for an opened chart, in such a way that the price shown are withing a certain range. But the documentation is so limited that the only thing I can find is about how to get the Max/Min prices, but not how to set it. So I don't even have a good
I am at my wits end trying to figure this out. I want to generate a buy or sell signal based on the close price of the last Heiken ashi bar. If the most recent bar close is higher than the previous bar, I want to generate a comment that says "buy", and a "sell" comment for the inverse. I am using
Hi, I want to do coding in the indicator to perform Y-axis rescaling, would like to know whether any code or function in MQL4 to preform rescaling the Y-axis (Price) ? Not using "F8" --> "scale fix", I want to do it automatic in the indicator. Thanks for your responses.
Hello, Does anyone know what the "chart update interval" is on MT4 by default, and if there is a way to view/modify this setting? On other software that I've used, "chart update interval" is basically the length of time between updates on the chart. Some traders who focus on a single market like it
My requirement is to calculate value across indicator of multiple symbols and get back result in whole, but looks like something got wrong that I can never guarentee all of the symbols outside of the current chart window is right. Brief code is as follows: void onStart(){ int output =
I have a indicator that I need to push notifications. I have gotten it to work. However all it does is it says "BUY NOW" I need to it tell me which symbol is it referring to. the Terminal alert works but I cant get the push to do the same. Line 185 Please help
Hi guys, I realise this question has been covered before, many times it seems.... but please, forgive me, I simply cannot find anything that works for me. I'm beginning to pull my hair out with this. I must be missing something very basic.... I have a CSV file, with a single column of data, say 12...
Hi, I read about the new mql4(Build 600+) and already updated my EAs, now i have a question. How secure is the new protection against crackers and other types of executable cracking and modifying the code. EX: hex editing date of expiration, memory dumps, etc.. How secure is a simple time...
Hi everyone. I've just updated my EA and I need to update product description. To add the new features I had to make some room as there's limit of 3600 characters, so I have done some changes in several places in the description text. When I click 'save', there's an error, turns out that the
  Simple MT4 - Java bridge (38   1 2 3 4)
Hi All, I'm a JAVA programmer and I use MT4 since one year. Although MQL is very simple and easy to learn, some things are really painful to code in this language. A few weeks ago a thought about a simple integration from logic-code written in Java into my metatrader EA. I searched the internet and...
  MODE_SPREAD (30   1 2 3)
When I use MODE_SPREAD, does it count the spread to open a position or does it count the spread to open and close the position?
Hi, Does anyone here tried to create a function that returns an array? Instead of creating a function that returns ticket number, open price for a specific logic, store all of the necessary data on array returned to a function. Thanks.
Hi I have an EA (written some years back). In the EA is a start time and end time for trading each day. In Strategy Tester it does not allow you to increment either the start time or end time to evaluate results. It is greyed out. When i look in the code the "time" is entered as a string and then
Is there any easy to use library for MQL4 to do list creation, searching and sorting? Like C# Generic Lists? The default Array functions look very limited and I’d have to re implement the sorting / searching functionalities from scratch. Thanks
Hi, I am trying to download MT4 but when I select MT4 I keep getting application for MT5 setup (numerous times). What could be the challenge
Dear friends am look for some information & gaudiness. how to make mq4 EA with this information: 1- checking the 10:40 candle in 5 minutes chart if this candle close in Bullish Candle will open Buy Position and take profit in form of TrailingStop start after 20 pips no StopLoss. if it's not a
Hi i am trying to run metatrader 4 on ubuntu vps. when I install metatrader 4 it asks for a proxy server. what is it? Ulf