MQL4 and MetaTrader 4 - page 418

As the title suggests, I am trying to strategy test a custom indicator of mine but it cannot seem to get passed certain dates due to an error that reads  "Array out of range" immediately followed by "Testing pass stopped due to a critical error in EA" then followed by "2 tick events processed in...
Hi, I'm using HalfTrend-1.02, And I have indicator's .mq4 file. My problem is if indicator's line is blue, give me 1 value, or if it's red give me 0 value. How can i do that? example; if line is red { Sell = True} if line is blue {Buy = True}
This function shall have to create a vertical line by any cross between the two moving average, instead how it works now after any cross it prints a line for all the following candles.  Have someone have an idea to how to solve that issue? I repeat, I need only a line for each cross.  In the...
Hi guys, I am a newrier to MQL 4 but I have already coded some EA and testing. But I am not a professional or expert programmer so I need to an help. I would like to know how I can set the STOP LOSS for sell and buy market order using a fractal. I meanI would like to have  a STOPLOSS= fractals or...
  Start trade  (1)
Any one please tell me. Can i open any order if my EA begin with the following code : int start(){   uchar i=0;  uchar k=0;  uchar t=OrdersTotal();  for(i=0;i<t;i++)  {OrderSelect(i,SELECT_BY_POS,MODE_TRADES);   k=0;   if(OrderSymbol()==Symbol()) k++;}   if(k=0)   { conditions and order send}...
Here is an attempt of a code snippet to backtest indicators for BO. You can implement it into any indicator and backtest the signals. Attached is an example for testing signals given by RSI 7 overbought and oversold for 15 minutes expiry.
Hello, is there any MT4 trader's group where people help each other by sharing ea strategys and backtesting results?
Hey, I've been trying to find if there is a way of retrieving the second last time a particular event occurred. An example could be that a green candle forms. Is there anyway of retrieving the high of the last green candle that formed before this one. Assuming the sequence was red, green,red,red,red...
hello, my EA loads its settings from a TXT File.  I am using MQL VPS. How can I upload this TXT file when I syncronize my EA? do I have to put it in a specific folder?   thanks in advance and best regards. 
Hello, I'm beginner. I have some curious. I run indicator. int OnCalculate(const int rates_total,                const int prev_calculated,                const datetime &time[],                const double &open[],                const double &high[],                const double &low[]...
in metatrader mq4 programming, re Close[shift+02], or Close[shift+05] as examples....does the program reference the close 2 bars ago, for the former, and 5 bars ago for the latter? if not, what does Close[shift+02], and Close[shift+05] and or Close[shift+10]  refer to or reference?
Hi all pro coders, Im Phong & a newbie  to MQL4. Im learning :) The problem is that Im trying to code a simple horizontal line on mainwindow & It gets value from Input properties, when the tick comes the code will check if I move the line to new position & obtain new value. So when i change timframe...
Hello, I'm new to programing and I need some guidance on a indicator modifying. I'm trying to write my own indicator but it's going very slow for now. So my problem is - i'm editing "Daily Pivot Points shifted for different day start time" posted by Jellybean (i've added Camarilla equation and some...
https://www.mql5.com/en/code/14883 I need this little help on this EA that puts pending orders on the hours, I would also like to add the minutes, thanks for your cooperation.
Hi Guys,  I'm in the process of learning how to convert my MT4 EAs into MT5 EAs. I'm working on a simple BB EA that buys on the lower band and closes at the middle band / aka: BASE_LINE. The EA successfully opens positions but does not close them out at the middle BB. Can you guys please point me in...
Hi  I am trying to run a strategy test over the last 3 years: Period1 Hour (H1) 2018.02.27 14:00 - 2018.06.26 23:00 (2015.06.27 - 2018.06.27) Though as you can see the strategy tester is only giving me 4 month's results. The broker chart shows live data from furthest back 1st Dec 2006. I have...
Hi, Is it possible to create an EA that will control all running EAs with features such as : - stop trading all EAs until tomorrow if PNL for the day is above/below xxx % of equity. Thanks
How would I deactivate specific strategy in code without affecting other strategies. I have about 7 different strategies on 1 ea and it’s taking enormous computing  resources with just 3 open charts. What do you all recommend. As I already have true/ false of strategy but calculations probably...
For example if I want to give the EMA a custom value instead of iCLose or the default values so I can see into the future, how can I do this? Do I have to reverse engineer MetaQuotes source or code a brand new complicated array indicator just for that? How would you go about it for a simple task? I
Can anyone help me? I got this indicator from my broker and have it set up properly (I know this because it runs on my other, slower laptop) but will not load on my main laptop. I keep getting the error Cannot load 'fxlabsnet.dll' [126] I have selected "Allow dll imports " in the options and have
I found a picture of interesting indicators, unfortunately, can't find them, if anyone got them or one of them stored on his computer.
This code example is taken straight from the MQL4 manual/tutorial.   //--------------------------------------------------------------------extern double Level=1.3200;                     // Preset level string Text[101];                               // Array...
Hello, I want to write that from 11 o'clock, if the price go higher 20 pips from the open of candle of that time buy and if it goes 20 pips below of the opening of that time sell, what would be that to specify this specific tim to my EA ? thank youu
Hi.  I would like help to make EA or as Indicator that can close pending orders when OLDER THAN x amount of HOURS old.  I have seen a ea that can close on time but that would close all pending orders and not the older ones only. Thanks for any help.
this program doesnt buy and sell on the chart and I dont know why, can you tell me the reason ?
hello, I have written this simple program but when I run it on the chart it does not sell or buy
Function call: Fun_New_Bar(); User defined function: //--------------------------------------------------------------------void Fun_New_Bar()                              // Funct. detecting ..  {                                             // .. a new bar   static datetime...
Hi There are indicators that show vertical lines at times of expected economic report, some sends an external http request to forex factory in order to get the time. How can I get the actual and forecast numbers show on the chart as soon as it is released? Thanks
Hello! I need a quick help with EMA calculation. I seem to be very close, however its incorrect around the 5th decimal place in EURUSD 1M. Any ideas? What's with this? Looks like something with the normalizing? Heres the EA that calculates the EA attached. Can you provide the correct way to have it...
Hi guys, I am a novist to MQL 4 but I have already coded some EA and testing. But I am not a professional or expert programmer so I need to an help. I would like to know how I can set the STOP LOSS for sell and buy market order using a fractal. I mena I would like to have  a STOPLOSS= fractals. I...