MQL4 and MetaTrader 4 - page 1043

[Deleted]
Hi, I want to know how can we tell the program to continuously check for new bar opening
[Deleted]
The moving average only goes back so far. I have an EA that uses moving averages as one of many signals. The problem I am running into is that I can't back test further than the moving average goes. Are there any moving average indicators that go back as far as the time chart goes
[Deleted]
Hi all, A year ago or so I started with coding mql4 expert advisors. I have no programming background so I had to learn everything from the start. Currently I am at the stage where I can code most common strategies. In order to improve my coding skills and gain experience, I am offering to code...
  2hour timeframe  (4)
Will there ever be a 2hr timeframe chart in metatrader?
Hi, I need some coding help. I want to set one buy order and one sell order at a specific time at a specific day of the week. Now I want the code for only trade if no buy or sell order is open. Who can help? Thanks and Regards, Jimbofx7
I am in process of creating a dll. In a mql4 function I would like to pass 2 or more parameters, which will be called in a dll. And the dll function should return multiple parameters. In this process I am passing a reference of an array resDataCollection1, which will store the data that is be...
[Deleted]
Hello to everyone, I've developed an EA that looks like working nicely in real time... The problem is when I try to make a backtest, using the Strategy Tester... Everything starts correctly, but all of the sudden, when one or two days went by on the tester, the EA starts to take wired deals, and/or...
What syntax can I input in DLL file and how to create my own DLL file in Meta Trader 4 ? Can I use Meta Editor for it ?
[Deleted]
i have his error in my EA code when i try to back test my EA but compiling the EA there no error . 2010.11.25 22:52:02 RAY MA finish inputs: profit=1000; stoplose=1000; lots=0.1; 2010.11.25 22:52:02 TestGenerator: unmatched data error (low value 1.3667 at 2010.11.19 22:45 is not reached from the
[Deleted]
Hi there, I am trying to find a code or if someone could be kind enough to help me program the code in mt4 for the following. I am trying to chart the varying difference from a moving minus the curren bar max or moving average - the current bar min. so that on the saperate window i would be avble to
Hello, I have a big Problem using the received Ticket number of OrderSend function. The Ticket which I get back from the function is not the same as the ticket that is placed in the Open Trades List..... Has anyone an Idea how this is possible?? The reason why I need the right ticket is because of...
Hi, I have two questions: 1.Why is the main Loop in an indicator f.e. BB_Oszillator running twice? I don't know, why I have to substract one from the actuall counted_bars: if(counted_bars>0) counted_bars--; 2.If I have a variable datetime test; How can I write 8:00 from the actual day in that...
Hi fellow traders, I hope you all had a successful trading week. Some of you might know me already - I can look back upon a "Forex Career" of 2.5 years. In these two years, I've been trading and heavily developing MQL4 programs such as EAs and Scripts. I know of many traders who are in need of a...
I'm trying to create & use an array of arrays, and got stuck.    //// note that StatsTally will resize pStatHolder to particular size   //int StatsTally(double pTallyValue, double& pStatHolder[]);      double Arr[];   double ArrOfArr1[169][];   double ArrOfArr2[][];   ArrayResize(Arr, 5);...
With version 1.3 my mt4R.dll has finally reached production quality and is released under GNU GPL https://sites.google.com/site/prof7bit/r-for-metatrader-4 and some example code that illustrates how to use it can be found here: https://sites.google...
The following script returns a '1' for any index of Time[], when run on a chart in any timeframe. For example, it seems to me that the barshift for 10 weeks back should be '2'. This error only seems to occur with period = PERIOD_MN1. It seems to work fine with any other period. Anyone have any...
[Deleted]
Hello, Can anybody help me with understanding the MT4 Multi Terminal and how we can set it up to run off of the Master Account? is there a guide somewhere we can use? any help is most appreciated
[Deleted]
Dudes, when i tried automated pending orders, when it becomes open for trade there is a difference of 12 pips (approx) in the entry price than quoated price. This is not consistently giving this problem, Sometimes it happens. Is there any valid reason? Thanks San
[Deleted]
Hi everyone -- I have taken a Fractal Signal Indicator program off the forum and have been attempting some modifications. Simply, the original indicator draws arrows onto the chart. I have assigned a score (idF) for each type of arrow on the indicator. My goal is for the EA to check the indicator to...
[Deleted]
  price gapping  (1)
Sorry, this is not directly code related but certainly may need to be incorporated at some point: does anyone know why price gaps at the open on Sundays? I have noticed that between the futures markets and forex, there seems to be some "drift" during the hour settlement occurs on the futures and...
[Deleted]
Hello Folks. I'm trying to figure out how to write a code which will delete a pending order after I placed a new one. Example: Existing BuyStop. Now I place a new BuyStop. What I need is a code which can look up all Buy Stops and will delete all, except the new one. I guess somehow I may be able to...
[Deleted]
Hi. I'm working on some indicators where the basic display idea is just to mark certain bars. I'm able to mark the bars with DingBats (graphic symbols) fine. Is there a way to mark the bars with normal alphanumeric letters (lower and/or upper case) in the same fashion? - sj
[Deleted]
can any one point out the mistake i make in this coding it can backtest but it dont have any error in loading and compil i do not know what wrong with it ///---- input parametersextern int profit=1000;extern int stoplose=1000;extern double lots=0.1;string Symb;int...
Hi, I have problems with programming an indicator. How can I code it, that the indicator shows a special value from 8 to 9 o'clock every day? I only can code it from the time I start the indicator with the "iBarShift(NULL,TimeFrame,startzeit);" - function. But how can I do it for the past?! At the...
Hello, i'm newbie in programming MT4 and i want to make my own expert advisor ... But i have some experience in C programming, so i have the logic n algorithm... Unfortunately, I still strange with MT4 language program even i have the logic... A lot of question that i want to ask, maybe i ask one
[Deleted]
  Take Profit Moving  (14   1 2)
Hello, I would like to write a script that moves the take profit of open positions.For example if open position current price is lower than 70 pips of open price than move the take profit 30 pips above the current price. Can anybody help me or tell if already exist something similar ? Thanks,...
[Deleted]
I've a EA that trades on MA crossover. But it doesn't place trades exactly at crossover. It places orders 1 or 2 bars late. Is there any way to make it work faster?i.e excactly when the crossover is made. I use the following logic: if(FMA<=SMA && PFMA>=PSMA && buycond==true) { //Open BUY ; }...
Does anyone know of an indicator that functions like %b with an averaging of results to give a general price location? In terms of Bollinger Bands, an example would be when price ranges back and forth across the middle band between the upper band and lower band or in a more narrow range from the...
[Deleted]
hello every one... i have problem in that.. i can increment lots and profit when get sl, if got tp, so will return to beginning.. but i can not combined them.. this is my code: void CheckIfOrderEarned()   {      int i=OrdersHistoryTotal()-1;   //----   OrderSelect(i,SELECT_BY_POS...
Hello, I'm new at programming and trying to learn. One thing I am trying to do is run a script from within an EA. I have searched in every way I can think of and can find no information or examples of this so before I assume it's not possible I wanted to ask here where the pro's are. For instance,...