Download MetaTrader 5

MQL4 and MetaTrader 4 - page 842

To post a new topic, please log in or register
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...
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...
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...
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
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
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...
  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...
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...
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
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...
  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,...
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...
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,...
Hello everybody, I'm making a EA atm but I have a small problem and I can't figure it out where the problem is. The is EA working with a two rules and the second rule is that it must wait until the current price has crossed a price in the history what is been saved in a variable. But the EA isn't...
Hello friends this is checkmail and after searching a lot found this color MA indicator but its having an bug or something is missing in the code.The line is breaking in between on the charts. Can anyone help in improving the code, here is the code :
Hi Guys I have bought a FX system, a bit confused! I have created 40 micro charts 15min 30min 1hr 4hr x 10 currencies By the way, these micro charts in the above profile are not meant to be watched continuously, but are to be ran passively in the background. how do I do this ? I...
Hello All, Is there anyone who can code this indicator to EA.
How to use place an order at the beginning of every second (regardless of price)? Sound simple? But I just cannot figure out how to do it? Should I use date and time functions? How? Thanks in advance!
When I am building the DLL sample provided with meta-trader using Microsoft Visual C++ 2010 professional (building solution as a 32bit DLL), it seems to be working fine on the machine I am compiling it on. But when I move the ex4 file, and the DLL file to a different machine (first machine is a...
Hi Elite Manual Trading System Publish Here
Hi Everybody, is it possible to start the strategy tester of metatrader 4 within a script and to receive all the report results and best configurations (of a GA run) in the code.   Thanks, Martin