MQL4 and MetaTrader 4 - page 497

I have this type of error (Array out range error) when I backtesting this EA. How can I identify the point of issue? Thanks Giovanni // Variabili globalibool check = true;extern string ParametriValori = "Inserimento volume degli ordini";extern double volume =   1;extern string ParametriCandele =...
Hi, is it possible to draw the line of a buffer over the spark plug 0? I tried it like this but it does not work! for(int I=-10;I<N;I++){      if(Linee==true){ExtMapBuffer1[I] = Up;ExtMapBuffer2[I] = Dw;}}
Dear all, where can I find a complete historical data to test my EA? I need as much data is possible....to have a quality model test close to 99.99% Thanks francesco
  indicator to EA  (6)
how to change this indicator to EA any help? this is trend line break indicator. when candle cross trend line or horizontal line it will send alert. thanks in advance.     #property copyright "" #property link      "http://" #property version   "1.00" #property description "Audible alert when...
I've been searching for a solution for a couple of days now, but still not 100% sure if at all this is possible... what I want is broken up in 2 pieces: 1. Say I want EURUSD "chart" -> this will open without showing a chart, but only info - i.e. window that spans across the screen, but is only x...
[Deleted]
Hello, is it possible to make a EA work same way in a live chart like he do in the backtest with control points mode? How are the candelsticks calculated in control points mode, is it possible to calculate them before the candel is finish or does this only work when the candel is already finished?
Please help, I'm trying to code an indicator which will involve a MA. The coding I have come up with for the MA itself is the following: double ONEHRMA=iMA(Symbol(),PERIOD_H1,200,0,MODE_EMA,PRICE_CLOSE,i); I then want it set a bearish indication on the screen if the price on close is less than...
Hello all As per the subject header, I would like to include some code in my EA which implements a position size as a percentage of account balance, using the fixed SL that I input for the asset as well as the maximum risk per trade = 6% of account balance. E.g.  Account balance = $10k , my manually...
  Long Trade on Active Bar  (11   1 2)
Hello, I was experimenting around with building an EA and had a couple of coding questions. With the following code, if(Low[0]>Low[1] && Low[1]>Low[2] && low[2]>Low[3].... Seeing that this would be trading on the movement of the active bar, what code would I use so that it would only take one trade
hi, I am on FXCM MT4 platform. I am wondering how can i import my own historical data into FXCM MT4 platform and conduct backtest based on these datas. I tried historical center / import, but when i hit "import", nothing happened and how can I check the data has been successfully imported? where is...
Hi there, I have an EA that I've been trying to back test with inconsistent results using the Optimizer. If I use the settings that come back from the Optimizer and just run a single pass I get different results. I decided to add some logging to a file in order to try and figure it out.  The first...
  help me  (4)
Ciao a tutti ho creato il mio primo EA partendo da un indicatore molto valido ma non apre posizioni, mi potete aiutare?? grazie Hi boy, i have created my first EX, copy the strategy of a good indicator, but the EA doesn't open ordes, can you help me
  draw a trendline  (2)
I would like to draw a trendline which has its first anchor point shifted from the current bar. Look at the picture below:
MT4 randomly deleted all of my account history. Why? I did nothing to this end at all. How do I prevent this? Any hidden settings/tricks?
Hi world I was wondering if someone could help me code in a trailing SL for my EA - i triede, but it does not come up in the menu (menu showed in photo)
  shorten double  (2)
Hello, how can I shorten double values in a reliable way. I want to have double with a max digits of 6. I tried several ways - doubleToString(double,6) -  and back to double - NormalizeDouble(double,6) but all ways are not reliable. If there is a double which is 0.69644 and I make NormalizDouble...
Hi please help, I'm looking for a mql4 formula for a red and green candle for the heiken ash indicator. I'm currently using an icustom for the HA indicator but this this slows the system especially  during testing. Grateful if someone could give me a  calculation in mql4 code. Thanks.
Hallo, someone has ever from an EA save a csv web-file (for example: ...myfxbook.com/calendar_statement.csv) in the folder "Files" and can possibly post a code example here? Thanks! Steffen
Hello.. Can help me how to put Horizontal Line in Rectangle?? Example if i draw rectangle in mt4 i want rectangle auto with Horizontal Line.. Look attachment for sample.. Thanks for help...
  Order ID number  (1)
Comments that do not relate to the "Deleted topic "Deleted topic "Where is my order ID number?""", have been moved into this topic.
Hi there!  I am relatively new to the MT4 platform and after watching endless amounts of you tube videos - was wondering if anyone could help me with a few remaining questions:  1. Do you know how to create a shortcut/hot key for adding a line or addinga text box?   2. Is there a shortcut/hot key...
  Adaptive rsi  (13   1 2)
Hi, does anyone have an adaptive rsi that is like the attached color rsi. I need it to show arrows at the over-bought and over-sold levels as well as being able to change the price. Basically a clone of the original color rsi, just adaptive. If anyone could share this indicator or doesn't mind...
[Deleted]
  Parabolic sar based ea  (19   1 2)
Hi everyone, I'm just a newbie in EA realm... and i'm sorry for my english.. i'm from Indonesia. i'd like to ask for help in this great forum... i made this EA a couple weeks ago.. it's based on Parabolic SAR in multi time frame.. but i need to change the rule... In previous rule, the EA waits for...
[Deleted]
When I modify my stop loss of an open order, I get this weird Error number 0 with the error description "no error". My result is a FALSE and I cannot understand why. Here is what I am trying to do: At + 50 pips, update the stop loss price to my trade's open price. I do not know why this would cause...
Hello everyone.  Brand new coding baby here...haha.  I just got my first EA to place its first order...hurrrray.  However, I can't get the dang thing to stop placing the order on every tick.  I tried this "if (t < 1)" snippet that looked like it was used to stop the function from repeating. Not...
Hello altogether, I try to develop myself an EA including the StochRSI indicator. Now i just want to modify the indicator a bit, and want to smooth it a bit by calculating the average, of the last 10 values of the indicator. I tried it with this code of Buffer3[i]: int start()  {...
Hi friends, I'm using iCustom function to get the needed data and I want to put the received data in arrays, Here is the main problem : As I mentioned I want to get the data from my indicator and store them in Arrays. The data would differ from one timeframe to other timeframe and each timeframe has...
  Running script using CMD  (12   1 2)
Greetings, I have encounter that I can run script on terminal startup (https://www.metatrader4.com/en/trading-platform/help/service/start_conf_file), but I would like to load the script after startup or is there any way for me to run script using command line? Regards.
Hi, maybe someone could help me with this: I am trying to change the MT4 charts time frame to 2 or 3 minutes. I know that I can do this with offline-charts. But the problem then: they're OFFline of course and don't update automatically, so they're not usesable for trading. Is there a way to change...
if (OrderSymbol()=="USDJPY_" && OrderType()==OP_SELL && OrderProfit() < (OrderCommission()+OrderSwap()))OrderModify(OrderTicket(),OrderOpenPrice(),Ask,0,0,clrNONE);if (OrderSymbol()=="USDJPY_" && OrderType()==OP_BUY && OrderProfit() < (OrderCommission()+OrderSwap()))OrderModify(OrderTicket()...