MQL4 and MetaTrader 4 - page 387

To post a new topic, please log in or register
Hello, Does EA debugging  is working for you ? I got -1 when I am trying to open a order under debugging ?  Thanks,   Pierre 
  EA Automate (2)
good afternoon for everyone... I dont kno nothing about MQL4 I learn but it's hard to entry in my mind. I have two indicators and I want create a automate EA with simple idea I have two indicators. and the EA its simple when indicator "A" give me the buy signal the system put the order and when the...
what is this compiling error? help me //+------------------------------------------------------------------+//|                                                   CF_XML_Lib.mq4 |//|                                                 Eugenio Bravetti |//|                                   http://www...
  Macd aspray indicator (18   1 2)
hi friends  I looking for macd aspray indicator but i can't found that indicator setup or code. if you have macd aspray code or setup please share us.?
Hi, I am getting the following messages from my strategy tester: "There were 134 passes done during optimization ...: optimization stopped, 954 cache records where used, 954 cache records rejected" Unter the green running time line below the main few windows is 1 088 / 1 280 (39 204) written. And...
atxjess
How can I return the highest(or lowest) value of a indicator over a set period in a EA? So for instance If I want my EA to trade when indicator one reaches a high of 10 or more and within 5 bars from that indicator two also reaches a high of 10 or more. So it would trade when two indicators made new...
Hi!  I wish to make the following: When there are active trades shown in the TRADE TAB I would like to be able to high light the trade and when the trade is high lighted the chart for that pair is brought up in the window. If the chart is not opened in the window, it will open a new chart. If I move...
Hi, what are the best formulas to evaluate the performance of a back test? because now we can use the ontester function, we can implement our own formula here... but which one? :) is the SQN (Strategy Quality Number) used by strategyquant in their EA Analyzer tool is good? thanks for your comments!
Is it possible to take the values of an indicator and put them into an array so that the values of the indicator can be looped through. I have tried for a while to find a way to do this but can't work it out. Below iis the core of the code for an indicator to mark spike highs (it allows for bars...
Hi guys, is it possible on MT4 to use an indicator with not standard timeframe within an EA working on another not standard timeframe but on the same symbol? For example, is it possible to recall an Adx with timeframe 2H within an EA working on 40 minutes timeframe on the same symbol? Thanks a lot
 I want to work EA on Build 600+ on MT4 but unable to solve this two complilation error.If any coder can guide what to do in such case would be great help to move on...on this issue.  1."not all control paths return a value" 2."return value of 'OrderSelect' should be checked"
int start()  {        // +---------------------------------------------------------------------------------+   // | LONG LOGIC                                                                      |   // +---------------------------------------------------------------------------------+      bool...
I have an indicator that draws horizontal lines on a chart based on swings.  Now, the math works every time (Comment() shows the values).  But the indicator isn't re-drawing when it should. Can anyone tell me why? Note: the functions HLineCreate, HLineMove, HLineDelete are from the help text....
Hi, I'm developing an EA that besides placing orders, create Alerts for take profit. Is there a command to create the Alerts in the terminal window ?   Thanks. 
Hi everyone, I'm looking for an EA which automatically trades on the break of a trendline. Ideally, it would have the following features: 1) Ability to set a stop loss (in pips from the opening price) 2) Ability to set a target profit (in pips from the opening price OR an actual price target) 3)...
I've written my EA, and it acts kind of strange on live but on tester it works all fine. On live it's giving me this error after what EA stops working "2014.06.25 14:24:01.661    array out of range in 'Buy.mqh' (116,48)" It's kind of strange because line 116 in that file is "else if (BUYSTOP_MODIFY...
hello, i try to attach indicators that i download (FFx macd for example), but i cant attach it to the chart , it just have the option to reset...(as you can see in the photo) this happened after i updated the metatrader 4 version to 646 . also, old indicators also stopped working and doing the same...
Hi forum,   First time poster here, please forgive me for any bad etiquette.  I'll do my best to keep this post polite and informative for other readers.   Using this and other forums, I have spliced together a very rough EA.  I plan to develop it as my skill set grows.  For now, I have managed to...
Hi, I am struggling to solve the following problem:  I have many charts open on which I am running different analysis. In most cases, there is no action of visual check needed, but in some cases yes. What I want is to send an alarm sound, plus bring the chart in front. I have tried many user32.dll...
Hello, I have programmed an indicator which seems to work at first when placed on a chart but will change it's behavior when running. I know it has something to do with how I'm calculating Limit for the for loop. Maybe I'm missing something obvious... Here's what I've got: (running on the M1 chart)...
Hi guys, I just bump in to MathRand() function but it only calculates positive number. Do you have any idea on how to get random double numbers from -1.0 to 1.0? Thanks...
The tested tick value  of EJ is 100, the deposit currency is USD.   I think this tick value is not correct,but the broker agent insist that it  is right.     //+------------------------------------------------------------------+//|                                                    tickvalue.mq4...
I want to calculate the slope of a moving average of 200 periods. I want to use the values of periods -12 and -2 (periodes couting from actual period) for calculate this slope. Can I acess historical values of a moving average?
Hi there, I'm trying to create HLines for every specified amount, for example every .0025 pips there should be another HLine. I've tried to do this on EURUSD with a script on and a custom indicator but no luck. This is the script version string objectName = "HL at: ";long chartID = ChartID();double...
I'm looking for a way to find the last high and last low based on moving averages.  The arrows in the attached image show what I'm looking for.   I don't use the current moving average trend.  I look for the last swings.  I've drawn the lines that are the last 2 'swings' in the High and Low. I've...
Hi All, I currently have an indicator that i am happy using which will simply place an Up Arrow or Down Arrow over a bar. I would like to know if it is possible to create another indicator that can read/pick up when an arrow has been placed on my chart. If this is possible could you please point me...
I would like to be able to place a Limit order at a specific price, and then when the order is placed, put another limit order at the previous price.  I know how to open and close trades, but haven't worked with Limit orders.  Does anyone have ideas on how I would accomplish this? Thanks!
when I compile the code (indicator), it does not say any errors. But when I try mounting indicator in the window price, the indicator box appears, but not the line of the indicator. Does anyone knows why is happening that? This is the code:...
I decided to open a thread for functions, that seem weird to me. It is not a bug report, just rather a warning for users. long  ChartOpen(    string           symbol,     // Symbol name    ENUM_TIMEFRAMES  period      // Period    ); Opens a new chart with the specified symbol and period The most...
During testing of an EA the terminal crashed. Normally I am able to go back into the terminal and continue where I stopped. This time the terminal does not run but crashes immediately after trying  to restart. How do I fix this?