Download MetaTrader 5

MQL4 and MetaTrader 4 - page 281

To post a new topic, please log in or register
Hi,  I can't seem to find an example of defining a function with an arbitrary set of parameters, just like Print(...)  is defined.  How do I go about declaring and then accessing a parameters array?   A code example, or a link to a documentation would be greatly appreciated, Thank  you.
  2 line MACD? (2)
Hi There,   I have been trying to insert a MACD indicator and my MACD has the histogram but only one line. I need the MACD with TWO lines. I have tried downloading a MACD called 'custom MACD 2 lines'  but it is showing up the same as the original. I am running MT4 on a Mac. Any suggestions? Thank...
Dear MQL4 Forum members, I'm new to mql4/mql5 and this forum. I've a question which I couldn't figure out by reading documentation or searching the web/this forum: Is 0 (zero) a valid/possible ticket number? In other words is it possible (although unlikely) that OrderSend returns ZERO as a valid...
Hi all, I was wondering if there is a pace holder similar to the 'Pass' in python, that allows the code to compile so you can compile as you go? Thanks
New article Programming EA's Modes Using Object-Oriented Approach has been published at mql5.com: In this article we are going to discuss programming modes, in which an MQL5 EA can work. The objective of this article is to describe the idea that "each mode is implemented in its own way". The author...
//+------------------------------------------------------------------+//|                                             SHI_Channel_true.mq4 |//|                                 Copyright © 2004, Shurka & Kevin...
I ran across a website that mention about a MQL code snippet, which will enable you to correctly backtest your strategy on price based charts. Does anyone have more info on this?    #include <CustomChartingBacktest.mqh> and at the very top of the void OnTick() function add the following function...
Hi guys! I'm having a hard time with MAXLOTSIZE.. My broker does not allow Lots greater than 50.00. So, when my MM calculates a greater lot than 50 would give me error 131. I could "cheat it " assuming that if the lot is greater than 50 assume 50 as default as shown bellow. What i Really would...
I understand the tick data from different brokers are different. But the data get from tickdata downloader of  StrategyQuant is same for all brokers. Can I use it for certain broker? Which broker is the tick data of StrateyQuant same as or from?   Besides, how about tick story? The spreads defined...
New article MQL5 Wizard: Placing Orders, Stop-Losses and Take Profits on Calculated Prices. Standard Library Extension has been published at mql5.com: The practical purpose of this article is adding to generated Experts a capability to place orders, Stop Losses and Take Profits at required price...
Hello. Can somebody please explain what code I need to check if a pending order with known ticket# is still pending or already open (market order)? As far as I know the ticket# changes when pending becomes market. Thank you. WorstCases
Hi, I am using metatrader4 platform on windows7 Ultimate edition. I am not able to add external indicators for my mt4 as I am not able to see either MQL4 or 'Indicator" folders in my Program Files. Please see the image below and help me. It happens with every broker mt4 platform on demo and real...
  indicator color coding (12   1 2)
Hello, I am newbie on MT4 coding. I am sure it is very simple to code what I want but for me is very complicated. So I want to modify to the code of a custom indicator like this: if condition==true  indicator color=blue else  indicator color=red endif Please give me some instructions how to code...
How to Take Print Without Objects? Follow the steps below if you do not want to print objects in a worksheet. 1 Suppose you have some data and a button in your worksheet and you wantonly the data to be printed without the button. 2 Right click on the button which you do not want to print and select...
I've been searching for a Neural Network indicator, for I didn't find anything good o far. Is there a free Neural Nwtwork indicator for MT4?
  Build 600+ and CPU usage (75   1 2 3 4 5 ... 7 8)
Using Build 500+ my approximate CPU usage per MT4 platform was 1-2%. Now using Mt4 Build 600+ my CPU usage is 4-5% per platform. Using MT4 509 I was able to safely run 14 MT4 platforms now using MT4 610 I can only run 6 MT4 platforms because my CPU usage shoots up to 35% usage and memory usage did...
How can I code the following constraint.  I wanna go long on EUR/USD (any pair) every 30 minutes with SL and TP at 0.2 lot size.  Thank you. 
Hello, I think that the subject tells it all. I wish to know if MT4 allow API connections. I will need an MT4 DLL, and reference it in my .NET environment, then build a DLL with function that will manage to send order (by code) to MT4, then build this functions in to DLL and add it to Ninja, then...
Hi There  I Search for the best using of the MA to detect the trend direction , I am using now the Difference between two iMA()  , if the difference > a number of pips then Up trend and vice-versa , but it's not an effective way . please some help .  Thanks .
Hello, I am just programming a sample expert advisor and let it run in strategy expert. but have following problem. I tried both version ( Open[ 0 ] and  iOpen ).   sPrice.dOpen   = Open[ 0 ];sPrice.dClose  = Close[ 0 ];sPrice.dHigh   = High[ 0 ];sPrice.dLow    = Low[ 0 ];sPrice.dOpen   = iOpen(...
Hello, I got a problem with my broker. During news my order are executed at least 20 seconds after ordering (latency is 10 ms - not a factor). Orders are BUY or SELL. 1. Is there a way to set time expire of orders, because after sending me order, I have no control to stop it if it not executed yet?...
PC #1 login trade without EA. PC#2 login by difference broker with EA. How to control PC#1 to operate order like PC#2 ? thank you
I am running build 765, and have set up a number of charts with trend lines for the support and resistance zones. Change template to view different indicators previously setup, and the lines are no longer visible. I've re-installed three times now, as I am sure this wasn't happening last week.. Am...
Hi all... Does anyone know if. ..after an EA has submitted a demo acc market order ...it can then open that symbols chart profile ...In my case its 6 charts saved under that symbols name in a separate live acc mt4 directory of many symbol names profiles. The reason being...the demo Ea provides...
Hi  I have an idea to visualise the data which MT4 imports to create the charts.  Firstly, how would I import the data real time into another program - how do I tap into the Forex data feed ?  What is the data type that is sent out that MT4 reads and converts into charts ? Failing all of that, could...
Hi, i need expert’s help for an EA Thank you. Jé.
Can I change this: //+------------------------------------------------------------------+   //| Ensuring its a new candle function                               |//+------------------------------------------------------------------+   bool IsNewCandle()   {      if(Bar1Time == iTime(NULL, low,...
I created a script to write a file with some fields, and one of them is TimeCurrent(). But the problem is that it is returning to me a number that I cannot translate to date in other programs (e.g. R, Excel, Calc OpenOffice).  This a sample of the numbers that it returns:...
hi there, i need a Sleep() in a custom indicators start() function but it doesn't work. so let's say this is the indicator: #property indicator_chart_window int start() {     datetime start_time = TimeLocal();     Sleep(2000);     Print("elapsed: ", TimeLocal() - start_time);     Print(""); } if...