MQL4 and MetaTrader 4 - page 87

  validate MT4 EA  (7)
how do I pass validation when my EA only works with EURCHF
[Deleted]
Hello everyone, I want to take a screenshot every time a certain event happen. In this example I take a screenshot every time a MA upward crossover happen: int OnCalculate ( const int rates_total, const int prev_calculated, const datetime &time[], const double &open[], const
  Filters' Trading System  (26   1 2 3)
Trading system of two indicators. May be used as a filter system as well to filter the signals from other indicators.
Hello! I am new to MT4 and currently learning about Expert Advisors. I thought I'd start with this Guide (https://www.mql5.com/en/articles/100) to developing my own EA. I only noticed later that the Guide offers an example using MQL5. Unfortunately my broker offers only MT4 :-/. By now I have fixed...
Hello, I am new using pointers and the `new` word. I am trying to make a dynamic array of class objects but when I got to the line where I use the `new` word, it crash (in the line 344), I know it is there cuz I added a print before that line and after it and only the one before got executed. The
  Elliott  (2)
Hi everyone ! I need the source code of the Elliott wave count indicator. Anyone who can help
Hello, I am trying to modify stoploss using the ordermodify function after partial profit taking in MQL4, but I keep receiving error 4108. All the variables have been declared without any errors. Thanks in advance for your help. else //else if you already have open orders, update your take profit
I know the MODE_MAIN value is an ordinary moving average. What about UPPER and LOWER? What is the formula for calculating the percent deviation? I know how to use it in MT4. Now I want to know how it is calculated
[Deleted]
Hello everyone, I have an indicator that define 2 market condition: uptrend (status =1) downtrend (status = 0 ). When trend change I want to draw n. lines with a fixed distance from a chosen price level. The problem would be that until the trend has changed current lines must be "extended" to the
int fibo( int x, int y, int z) { if (z > 0 ) return x + z * (y - x); else return y + z * (x - y); } int OnInit () { // Initialize global variables and settings here return ( INIT_SUCCEEDED ); } if OnCalculate ( const int rates_total, const int prev_calculated
#include // include the Trade library for buy and sell functions input int period = 14; // set the period for statistical indicators input int threshold = 70; // set the threshold for generating signals double movingAverage; // variable to store the moving average double relativeStrength; //
Hi everyone, Is there any sample code of a MACD Line crosses the Signal Line? I use the following code from the documenation but this is not the code that I was expecting: if ( iMACD ( NULL , 0 , 12 , 26 , 9 , PRICE_CLOSE ,MODE_MAIN, 0 ) > iMACD ( NULL , 0 , 12 , 26 , 9 , PRICE_CLOSE ,MODE_SIGNAL, 0
I keep getting 'INDICATOR_PLOT' - undeclared identifier INDICATOR_PLOT is meant to be an internal variable Wrote the code below but keep getting undeclared indicator error. Code is meant to draw arrows and give alert if price closes outside of 5ema
Hello in MT4 I need use of "3 Monthly" - "6 Monthly" - "Yearly" Chart, do you have any advice? I could not use of priod_converter.mq4 , it will be hang on updating chart could you please help me? Thank you in advance
i keep getting error what am i doing wrong input int ATR_Period = 22 ; input double ATR_Multiplier = 3.0 ; input bool ShowLabels = true ; input bool UseClose = true ; input bool Highlight = true ; int direction; double longStop, longStopPrev, shortStop, shortStopPrev, atr;
[Deleted]
Hello everyone. I have an indicator that plot something similar to a moving average and i wanted to "extend" the last value of that buffer to the end of the visible chart. I tried this but nothing plot: for ( int iBar = Bars - 1 - MathMax (lookback, prev_calculated); iBar >= 0 ; --iBar) {
  Trade Panel  (12   1 2)
Hello! Trying to make a trade panel, started to read the documentation and already figured out ( kind of) how to make buttons and basicaly objects with code. One thing I cant find.. there is this box where you enter different values, and from where order function will take the data for SL, TP, SIZE
Hello and Happy New Year to all, Can any expert developer help me to find a solution for special case that few broker disable trading during certain high/medium impact news time. So how to make mobile notification alert for such situations when broker enable the trading after market get back to
Im logged into my broker acct. But I cannot paste my EA into ANY folder in MT4, not Experts, Libraries etc. I also can't get to the folders from the finder "show package contents" path. Im on a Mac and my system is up to date. Any ideas
I really don't use mt4 for order entry and I see this when I try. Is this something with just my broker and only with the sell side or both sell and buy? Thnx
I want to make a total TP for same direction Grid order. For example, current trend is BUY and I want to place BUY Grid1, 2, 3, 4, ...... They should be closed altogether when BUY Trend change to SELL Trend. I expect BUY order close price is below orange line. What will be calculation formula in
I'm trying to backtest an ea for a single indicator on the 15 minute time frame. I can run the backtest with 90% modeling quality, but the results are inaccurate. When I open the chart to view the trades made, there are many buys and sells that were triggered by a price not within the range of the
I want to delete objects whose name contains the specified substring. When working with my own chart, I use this with no problems: void objectsDeleteById( string id, int line) { for ( int i = ObjectsTotal () - 1 ; i >= 0 ; i--) { string name; if (!objectGetName(i, name) ||
Hi, Can someone tell me if is it possible to run 2 or 3 different MT4 accounts on the same MT4 platform (For example all on ICMarkets) but i want to use different EA for each account. Please tell me how. Thank you
Hi, 2 questions:  1) Can an EA successfully run on an offline chart? and 2) What is the code snippet to disable or turn off chart (Offline chart) after the 1st tick of a new candle received and then re-enable this same chart after a new candle on chart has been opened (the next candle) or to turn...
hi devs, I'm stuck in a problem in mql4 that I didn't find answer anywhere. I need to do the following: When choosing mode1, enable option 1 and disable option 2 and vise versa whe choosing mode2 Is that possible in mql4? Thanks
Hi. experimenting with the MQL and I noticed that a trade for GBPNZD on my demo was opened at Sell 1.90798. when I enquired about the OpenPrice through this fucntion, value return is double -> 156680407. Can someone explain how this converts to the actual price point? I want to modify order with
  wrong output from iMA()  (11   1 2)
Hello everyone, I'm trying new code with Moving averages on 3 different periods: string MAsBuySig; extern int cx1= 2 ; // MA shift 1 extern int cx2= 3 ; // MA shift 2 extern int cx3= 4 ; // MA shift 3 void OnTick () { double MA200_cx1 = iMA ( _Symbol , _Period , 200 , 0 , MODE_SMA , PRICE_CLOSE
Good evening everyone, I have a problem with mt4, I can't close or modify a trade that doesn't exist in the list of possible pairs. It's a demo account but I don't want this trade to remain open. Is there a solution to this? I can't delete demo account until I close all trades... I post pictures of
Hello, I got this code from this forum and I've which should let my orders only be executed once its been 2 Hours since my last trade closed. However, If I run it then my EA does not make it's first trade at all. I've forced it to buy using the OnInit Function and closing it when the Ontick Function