MQL4 and MetaTrader 4 - page 317

To post a new topic, please log in or register
Hi   I try to adapt and customize a code and I still have three errors Quye I can not seem to correct, the block of code in question : //+------------------------------------------------------------------+//|add char at beginning or end of...
#include <CustomChartingBacktest.mqh> and at the very top of the void OnTick() function add the following function call: if(skipFirstTickOnBacktest()) return;   //+------------------------------------------------------------------+//|                                       CustomChartingBacktest.mqh...
Hi all, I had an EA which worked fine. As I needed to avoid to open position on calendar events, I've added some more code into my EA. In order to test it, It simply opens a long position if EURUSD market rate is above 1.1300 and opens a short position if the EURUSD market rate is below 1.1300. It...
I just installed MT4 for the first time and playing with it using demo account. A few questions. 1. I placed GBPUSD order having volume 0.01 by clicking on "Buy by Market" button. Now how do I see at what price did I buy this? Like some sort of order history. 2. I didn't enter any value for "Stop...
Hi, My EA is using custom made indicators (e.g. Keltner channel from https://www.mql5.com/en/code/8445). It is looking on multiple timeframes  using iCustom where the second parameter is set to different timeframes.  In the strategy tester, if I select the Period to be H1 and press the start button...
I try to find configurations. I find some configurations, but not for This problem. So, how to create a configuration file, to start the terminal with autologin to mql5.community (Preferences->community {Login:Password}). Thanks.
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...