MQL4 and MetaTrader 4 - page 886

[Deleted]
Hi, I'd like to add just another question to the iBarShift discussion: e.g.  iBarShift("EURUSD", PERIOD_H4, D'2013.06.21 14:10' , true) currently returns 62. I would have expected it to return -1, since there is no bar in PERIOD_H4, opening exactly at D'2013.06.21 14:10' . So when would it return...
New article Graphical Control of External Parameters of Indicators has been published. How often do you have to set or change external parameters of indicators? Many of you must have once thought of moving them to the chart to be able to conveniently drag an icon or an object to the required...
New article Social Trading with MetaTrader 4 and MetaTrader 5 Trading Platforms has been published: What is social trading? It is a mutually beneficial cooperation of traders and investors whereby successful traders allow monitoring of their trading and potential investors take the opportunity to...
hello everyone, is there a way one can combine two expert advisors using different magic numbers? I know I can write them all into one file, but as they are, separate is there a way that they can be combined, without writing them into one file?? thanks
hi, i have a string array such below. Is there any code to show string variables from array in data window? string pair[28]= { "EURJPY", "GBPJPY", "AUDJPY", "NZDJPY", "CHFJPY", "CADJPY", "USDJPY","EURUSD", "EURGBP", "EURCHF", "EURCAD", "EURAUD", "EURNZD", "GBPUSD","GBPCHF", "GBPCAD", "GBPAUD",...
Dear all   here is my code:   //+------------------------------------------------------------------+//|                                                      testing.mq4...
Is there script that can set a stop loss to close only a percentage of an open order?  I have a position that I want to hold open but would like to scale out of in the event price action begins to move against me.
I have 28 arrays. Every array has double values. How i code to compare these values? For eample i want to find the second value from 28 values for every order(secondvalıue[i]) Please show some simple codes. Thanks.
[Deleted]
Good morning, I write a simple indicator for stochastic cross with the arrow is either above or below the bar. However, I want the arrow to be at the bottom of the chart window, say 0.5 inch above the lower border of the window. I don't know how to do it and I wonder if you can help me. My code is
[Deleted]
  bug on iBarshift  (8)
code:    Print("wtf ", iBarShift("JPYJPY", 1, Time[0], true));    Print("wtf ", iBarShift("JPYJPY", 1, Time[0], true)); output: 2013.07.05 10:49:29    test GBPUSD,M1: wtf 0 2013.07.05 10:49:29    test GBPUSD,M1: wtf -1 as you can see, giving ibarshift incorrect symbol produces inconsistent result.
[Deleted]
Hi, I have graph, when bars start no standard time, example: TF 15min: xx:05; xx:20; etc. I wrote easy code script: int start()  {  datetime time=StrToTime("2013.02.25 09:00");  int StartShift = iBarShift(NULL,0,time, true);  Alert(StartShift);  return(0);  }  Why function iBarShift don´t return...
[Deleted]
Hello Everyone! I'm new to the forum and new to MQL -- so please be patient with me.  I am looking to write a program but am unsure if MQL4 easily supports the kind of functionality I'm looking for. What I want is a program that continuously monitors the net value of two or more manually placed...
[Deleted]
SPAM removed
[Deleted]
I'm looking for simple EA, that buy whenever CCI break it's own MA on the way up, and sell whenever CCI break it's own MA on the way down. I looked at some samples, and didn't find one that is simple. this should be simple.   please help,   thanks,  
i am using demo acc when i open strategy tester before it was possible to select start date and end date . but 14 day back start date is selected and enddate when selcted optimization beomes checked  in and w cannot select end date attached file clip pl help
  Protect Profit  (7)
Hi all, I'm looking to get a function where once total order profit get say $10, if it bounces back to $5, our open orders are closed. I'm try to make use of the follow code, but can't get the result expected. Is that possible get some help to put me in the right direction ? extern double...
New article Testing Expert Advisors on Non-Standard Time Frames has been published.It's not just simple; it's super simple. Testing Expert Advisors on non-standard time frames is possible! All we need to do is to replace standard time frame data with non-standard time frame data. Furthermore, we can...
  Triple Screens  (1)
Hi, unsure if this is possible, 3 screens up on the monitor, 3 different time frames, move the mouse over one and it moves over the other 2 as well, for example move mouse on the 4 hr chart (history) and this will show me where that is in the 1hr and daily charts I'm terrible at explaining this :(...
Hi all, Using the following code am looking to close orders once the TotalOrderProfit gets equal or less than TrailedPrice. I have put a print to check why is that not working and what I see is that the price do not come down. Could you show me what am doing wrong ? void StartToTrailPrice()
Hi, I've got a strange problem where I want to edit a source code but MT4 doesn't let me do it. When I click on the icon that looks like a yellow diamond with an exclamation mark (or shortcut F4), it is non-responsive and does not open up the source code like it used to. I tried uninstalling the MT4...
[Deleted]
  help writing a file  (12   1 2)
hello, i"m learning the mql4 for a while. and i just cant understand what is wronge with my code. trying to write a file with this code :   extern string FileName = "testfile12.csv";extern double candle_open_new,candle_open; int init()  {//----  candle_open   =  iOpen(NULL,0,1);  //----...
[Deleted]
HELP :: I need to add a pop up window and sound for this indicator.....
Hallo, ich kämpfe mich gerade durch das MQL4 Tutorial. Die ersten einfachen E.A. laufen. Doch immer wenn ich ein Skript laufen lassen will, kommt folgende Expertenmeldung: 1. 2013.07.05 12:27:22 probe EURUSDm,M15: loaded successfully 2. 2013.07.05 12:27:22 probe EURUSDm,M15: uninit reason 0 3
[Deleted]
  Code inquiry  (1)
Hello everyone, I was wondering if anyone has coded an EA or indicator to have the display and history chart bars reset to its allowable minimum to avoid sluggishness without restarting MT4. All help and input will be appreciated. Thanks in advance, David
Hi I've written a series of EAs that I use across multiple TFs and Instruments and it became a chore managing the settings for each of them.  This is what I do at the moment 1. In each EA I have all the settings stored in a file in the experts/files folder, and I autoload those settings into the EA...
[Deleted]
Plz help me, i don't know what wrong :( extern double                Lot = 0.01; extern    int         TakeProfit = 200;  extern    int           StopLoss = 2500;  extern    int           Distance = 250; int init()   {    string name;    double normprice;    for(int i=0;i<OBJ_HLINE;i++)     {...
Hi guys, I have attatched the indicator.. It draws a horizontal line which sounds an alarm when it is crossed, however I would like it to also show a pop up box. Its a useful indicator for support and resistance levels. I would be very grateful if someone could finish it off for me by adding a alert...
[Deleted]
Hi guys,    Im trying to use the winsock library to receive orders through a socket from my order processing server, but using the example wsockclnt.mql4 as a base, I havent found a way to sucessfully put open and close orders on different timeframes.  Example:  (Several of those orders where...
Hello, please, I need suggestion for add a month in a date variable. Example: string date = "1992.01.01";datetime newDate = StrToTime(date)+1 month;Print(TimeToStr(newDate)); //Result: 1992.02.01
Hi, I have written a piece of forward-testing analysis software that I may be interested in sharing / selling to others in future. The software requires FX price information. Currently I extract price information from an MT4 broker using a DLL on a minute by minute basis and then store this...