Download MetaTrader 5

MQL4 and MetaTrader 4 - page 542

To post a new topic, please log in or register
iMA and iRSI has shift parameter that we can use to find the values from past bars. MarketInfo() doesnt have  how can i find the closing price for Bid and Ask for the past bars? what function should i use?
I am new with FXXD MT4 platform I want to superimpose RSI with SMA and EMA moving averages on smae window outside the chart window How can I do it I also find that the APPLY does not have option of "Previous Indicator Data" to superimpose Please advise thanks for the help cheers
New article Forex VPS by Fozzy Inc. is published: VPS (Virtual Private Server) is a service whereby the user is provided with a so-called virtual private server. Virtual server emulates the operation of the standard physical server. This physical server has several virtual servers configured on it...
  Help with lines (24   1 2 3)
Hi all I am very new to MQL4 and hoping someone will feel sorry for me and tell me where I'm going wrong please... To start with I'm trying to draw two vertical solid red lines on a chart one at midnight and the other at seven in the morning.  When I run what I have written I get one at midnight and...
Hi guys, This one is a 2 part question (with sub-parts).  Part 1 1) First, regarding my EA, I want to know how I can make it open only 1-2 (verify criteria to determine how many) orders per bar and then discard the bar as verified. I was thinking of defining a variable e.g. barVerified (set at 0)...
Hi Coders,   suddnely my Print function stopped sending its outputs to a log file, though it keeps updating the Experts tab ( which is unusable for my analyses, however).  Did I uknowingly changed a switch, somewhere ..?
Hi guys, i tried to open a trade via EA as a marketorder. It should be a BUYING Order with a Stop Loss of 25 Pips and a Target of 25 Pips.       ticket=OrderSend(Symbol(),OP_BUY,0.1,Ask,3,Bid-0.0025,Bid+0.0025);      if(ticket<0)      {      Alert(Symbol(),": OrderSend failed with error #"...
Hi all, _I'm looking for a timer that close all open orders on Fridays by the end of market. Could anyone give a help here ? Thanks in advance. Luis 
My provider FxCast stopped trading on my(and on propably meny others) live account, without any messages. There is no answers for any questions for FxCast. Does Anybody know what the matter with FxCast please ? Can Anybody have idea how to continue? Help please!  Thank You for any answers. Bohem
Hi all,  I've a workable EA with no problems in an ECN Broker, but on a STP Broker the Trailing Stop do not work. A error 4051 and invalid lots amount for order send function has been returned but can't figure out how to get from here. following is the code for TrailingStop. Any clues here ?  void...
This is my first EA, and I keep getting the  '\end_of_program - unbalanced left parenthesis' error message when compiling, but I can't find any missing parenthesis.  It's based on MACD Sample.  Please help if you can.  Thanks!!!- ----  //| expert initialization...
Dear All Bro,   I want to test my EA by using a long history from 2010 to now. However, My history data base has only 1 year data from 2012. How can I get those data?    I have tried to download the data from the server, still it is not enough.   We know it is important to obtain sufficient data for...
I have a problem when I import the data to MT4 history center,  5-decimal points data had been converted to  4-decimal points (both .csv and .txt  data). Please tell me what is wrong and how to fix the problem?
  function sleep alternative (36   1 2 3 4)
Hello MQL4 community, I've encountered an issue while running an EA including the function Sleep() in the strategy tester. Apparently the tester won't run the EA properly with the inclusion of function Sleep() embedded in the code. Have any coders present discovered an alternative method from...
Hi, i try to send a string from mql to dll and work with them...  Code in MQL: #import "myDLL.dll"    bool SetString(string foo);#import//+-------------------------------------------------------+int start() {    string foo = "bar";    SetString(foo);} Code in DLL (taken from http://www.codeproject...
I have a minor but irritating problem with optimization graph. I installed mt4 (build 438) on my new laptop and when I do optimization, optimization graph shows only dots. In my old computer, also build 438, it connects dots with a line. How do I get optimization graph wih dots connected by lines?...
In order to use price data for any instrument in plotting any indictore on the current chart I appended extern string Security_Name = "EURUSD" under indicator parameters and changed NULL to Security_Name. This works fine as long as the price I am calling in is within the group my price chart...
Hello MQL4 community, Currently, I'm saving prices to a single dimension vector (array) and wish to determine if these prices show upward/downward direction. I am able to complete this task arithmetically but wish to read other coder inputs for simpler methods of going about coding this. Task...
Hi, my problem is: when I put the EA in 15 pairs for example, 1 by 1, this problem doesn't appear. But if I start MT4 with the EA already attached to those 15 pairs MT4 uses 100% CPU until I close it. This is so strange, anyone got a clue?
Komodorpudel
Hello guys,   i am new to programming and forex and that is the reason why i am also using an online EA builder :) So far it worked very well but my problem is, that the EA re -entrys at the same bar every time after a stop loss gets triggerd. This is pretty annoying while using a 5min period. So...
Have problem where I want EA to find data from latest closed order in account history that has special comment. I do not know mql language so good and have problem to figure out logic how to solve this problem    //-- Information from history ordersint      hst,         hstAll=OrdersHistoryTotal()...
  bet  none of you can write an EA like this.  losing money  like a boss lol 
Hi, I want to show the crossover from the daily chart on a H1 or H4 chart. But I only want to show it once. The problem is, since the data is from the daily chart if there is a crossover it will be correct for the entire day on the H1 and H4 chart. So at every new bar on the H1 and H4 chart I will...
I would like to start this rectangle from midnight, how can I specify the time? ObjectCreate("box",OBJ_RECTANGLE,0,Time[24],hprice,Time[0],lprice);
Carl Lema
Hey I have been trying to code an ea that can open orders on different symbols but whenever it tries to open on a symbol that is not the current symbol I get the error "unknown symbol for ordersend function" which is error code 4106. Some one please help!
Well -intentioned rant follows:  There are hundreds of pages on the forum regarding Backtesting limitations and errors, yet a search in the book and documentation reveal nothing in the way of workable solutions. I have spent the last week addressing the well-documented problems with backtesting in...
Dear Mates/Professional here, I am facing problem with meta 4 platform.I used drawing objects such as tradeline,gann analysis,shape, and more for only technical analysis better but it is not continue my screen i draw it after some while it disappered!!! not lasting more time ... My broker is ECN and...
Hello Experts !   Please find the code here. When I try to backtest it, it shows Order Modify Error 1. Your help will be highly appreciated in this regard.   //+------------------------------------------------------------------+// SUPER SONIC EA BASED ON CUSTOM...
I've done a fair amount of back-testing before, but today I have seen something very strange that is interfering with the operation.  When doing a visual back-test (in order to look at the trades and see if they agree with what I intended to automate), at the end of a simulation, 95 indicator...
Hi Coders, being the OO guy that I am, one of my concerns is whatever happens to custom arrays when the lifecycle of an indicator ( within which such arrays are defined)draws to an end. More specifically: Is there any garbage collector which takes care of this, including arrays which have been...