MQL4 and MetaTrader 4 - page 513

To post a new topic, please log in or register
Hi, I'm trying to make a simple EA which should be able to recover any losses in 10 trades. But my code won't works and I can't see where the mistake is. Are there anybody who could give me a hint to where the mistake is ? int start()  {    int total = OrdersTotal();      double recovery_amount;...
Hello, I'm using ATR in my systems, but i need ATR show on chart with 5 or 6 digits. How can i do that? Anyone can help me? Thanks a lot. Bizu
Hello I have a problem writing to a file. These are the two first cells in the CSV file: none none After running this line: FileWrite(handle,"AUDCHF"); The result is : AUDCHF ne The problem is, why the FileWrite function removes the firsttwo characters from the second cell? Thanks
dear senior and forum community, please help i trade with grid using ea, i want ea open new position only if no position in the same area example using grid 50 point, current price is 1.5000, then price move to 1.5050 (if no position active at 1.5050 then open new buy, but if there is active...
Dear Forum, Is there any example to teach me to handle correctly the function: int ArrayCopyRates( double&dest_array[], string symbol=NULL, int timeframe=0) Let's say I need to code the indicator WPR inside DLL, how to pass the parameters to DLL? Also, is this process slows down the considerably...
Phoenix_5_6_03 what is the currect optimization this ea
Hello Is it possible to have the very useful Polyline code in a separate, self-contained library file? Because I've had issues getting the code to compile, it seems integrated into the trading functions of WHRea.mq4 but I just want to display the result from calls to iCustom, and when I try to...
I am new at trading and I found the EA named "Expert+10" here on the site. This EA only works well with EUR/USD because it is set to a particular time frame, "I guess," specific to the EUR/USD. I was wondering if there was a way to set it up to trade the previous days high and lows on any currency...
Hi, I am developing a function that is driving me crazy, a simple: if ( temp1 == temp2 ) seems not to be working. The Original function is: int encontraIOposto2(int direcao, double valorFecho){   for(i=0;i<150;i++)   {      if ( direcao == 1 && valorFecho == longGridPositions[i] ) return ( i-1...
Hey guys! I'm very new to writing EA and just trying to learn the basic of it by making a simple moving average cross over + RSI + trailing stop loss EA. My code is as below but I can't find any reason why it keeps saying unbalanced left parenthesis. I even check every single parenthesis with the...
Hi all: I want to test my EA, but in the tester, it seems that lots of the historical data are missing. As shown in the following image, the data between 2012.04.02 15:00-2012.7.27 05:00 are missing. My code is very simple. Just demostrate the idea. int start(){Print("Enter the trendea2, time @...
Hi, as the title. Can anyone help me? Ex: I have order on H4 and i want to close it (use OrderClose()) on H1. Im thinking but have no idea to code. Please help.
What's the difference ? I guess G lasts 4 weeks if not visited, while S lasts forever. Both are stored on harddisk. G can be deleted with MQL, what about S ?
Hi, first of all, sorry for my bad english. I hope you understand my issue. I created an EA with a OP_SELLLIMIT command and I always get ERROR CODE 130. This is my code: if (PrintOrderData) Print("OrderPlacedTime [",TimeYear(Time[0]),"/",TimeMonth(Time[0]),"/",TimeDay(Time[0]),"; H="...
When backtesting (using the tick method) the highs and lows on other timeframes get all screwed up. Is there any work-around to resolve this? My EA uses various timeframes at the same time, and it needs the highs and lows to be correct.
hi, guys I got a question. my EA stop working after several hours. Thing is, I can't find certain answer as to why the EA stopped working. It just did. Once every several hours I have to restart my terminal. I dont know why and I really want to know what's blocking the EA to work continuously....
Hi i`m trying to build an EA to trade candlestick patterns.The strategy would consist of 3 candlesticks.And after the second candlestick a buy-stop or sell-stop order would be placed above or below the 2 candle's wick,after the 2nd candle is formed but when the 3rd one is still forming.The problem...
This gets called and checked every hour with regards to the bias. For example "H1_Bias" will be checked every hour and can change to "None", Down, or Up based upon MA's. It works in conjunction with "IsNewCandle()" function. I am getting the error 4108 and market order cannot be deleted... I know...
Hi, I'm not a coder, just a user, so please help me understand why we are "stuck" with 5 min or 15 min time frames or 1 hr and 4 hr in MT4. I know we can create out of the ordinary time frames offline, but "live" candles are what I trade with. Does someone in this forum have an application (for...
First off, I know Raptor that you have raised this issue with me before, but I cannot remember where you wrote it, and, more importantly understand where I am going wrong? As far as I am aware I was writing it correctly so that the EA attached to any corresponding Pair will be able to always work on...
Hello all, First post so please direct me to the right place if you need to. Im not sure if I need a script to do this but please let me know if I do (and provide solution if possible). I am trying to create a simple mql4 program or script that will place trades based on the MA. There is an...
As of last night I noticed my trade signal alerts sent push to my android phone stopped coming through. If I open up MT4 on my phone, sometimes it will give me the alerts but all the past alerts come through at once. Never had any issues with this before. Any thoughts on what may be causing this?...
may we use more than 8 buffers or arrays in an indecator or EA ?
Hello I have 2 codes, that look almost the same but the results on backtest are 100% different. Can somebody tell me what is wrong with 2nd code because that is the one that is broken. 1st code: int start(){               double MA_1_t=iMA(NULL,0,FastMAPeriod,0,1,0,0);double MA_2_t=iMA(NULL,0...
Hi MQL4 community, I was wondering if anybody knows how to change the display of the following oscillators: MACDRSISTOCH from there standard display placed at the bottom of a chart, to example shown in the image I have attached to this post? Please do let me know! Thank you so much in advance....
Hi, Here results of work of the program above which I worked more on a year. Advantage of the program is work at all brokers, and an opportunity of loss of the deposit never. I have already created that program in which is assured. I have received 22% profits for a week of work on real but it not a...
programandomql
Hi, I'm planning an EA, which will send a series of orders if trend develops well. The latter orders depend on former orders. And orders's sizes are not the same. The very first order's size, especially, is quite different. So, I'm thinking: what if MT4 re-connect? ----even if I try to keep it...
I'm using MT4 4.00 build 509, but this bug has been around for quite some time. The attached program draws Daily cycle lines using DRAW_HISTOGRAM to draw vertical DOT lines. The desired line style is DOT, which works when zoomed out, but if one zooms in to the 2 closest zoom levels (5th or 6th),...