MQL4 and MetaTrader 4 - page 91

[Deleted]
  global initialization failed!!!!!!!  (73   1 2 3 4 5 ... 7 8)
If anyone could help...I run an expert advisor for 4 chart pairs, and for running it for the 5th, after loading succesfully, i have global initialization failed, and then removed ... I would appreciate at least a guidance what to look for.. Thanks
[Deleted]
  Maximal drawdown  (8)
Hi. I ran an EA and got 29.59% Maximal drawdown (5315.90 $). As I know, maximal drawdown is the maximum difference between any top to any bottom. Looking at the back testing report , the maximum difference between any top to anybottom is 2701.40 (25547.80 - 22846.40) which are 10.5%. Can anybody...
I bought an EA from a certain party and dropped it onto a chart. The EA screen appears and the Journal tab showed that the EA was loaded successfully but no trading at all is happening that is supposed to happen. How can I tell if the EA is running or not? Is there any way to enable debug messages
I'm still trying to wrap my head around creating and accessing arrays... Not quite sure what I did wrong here. Thanks for any insights. :) double SwingValue[]; int sBars; sBars= Bars ; for ( int i = sBars; i>= 0 ; i--) //starts at first bar, to current bar
I have global variable that is used in function, then I use script to test the function result using the alert function Alert("Variable","Function()); Alert(" Function ()","Variable"); but when I alert the result of the function and the global variable the result differs if I mention the variable
Hi, I am trying to get the moving average value of the RSI. RSI - 14 length MA - 20 I saw a lot of different examples on here but seem a bit complicated. I created the below code which seems to be working just fine to get the current value. Can anyone confirm if this is correct or why it is wrong
Wondering if someone can shed some light on an issue I'm having in my OnCalculate() function. I'm trying to do three iterations of calculations when the function gets called, but I can't seem to get anything to happen in the third iteration. Everything works fine in the first two iterations, but if
//+------------------------------------------------------------------+ //| Close Opened Orders | //+------------------------------------------------------------------+ void OrdersClose() { for ( int i = 0 ; i < OrdersTotal (); i++) { bool
Hello, please see the two errors attached. I will paste the code below, I would greatly appreciate if you could tell me what to put exactly where. Thanks in advance #property version "1.00" #property strict input double Lots= 0.01 ; input double TrailingStopStart= 100 ; input double
hi , greetings to all , i'm not coding background person . i used the attached ea in older version mqal4. now i try to octafx new version mql4 its not working. kindly any genius help me out from this issue...... it is basically buy sell grid EA
hi devs, How can I capture the account balance on day 1 of the month? I tried the following code but it failed: If(Day() == 1 && Hour() == 0 && Minute() == 0 && Seconds() == 0 ) { Start_Balance = AccountBalance() }
Hello all, I've got this weird issue that I haven't been able to find the answer to, so now I turn to you and hopefully you know what's happening. As a relatively new "student", I'm still experimenting with code and see how it all works together. I've been experimenting with finding objects, and
Hello MQL5 Community, I have 2 errors in my code, I need your help please ! ligne 156 : ' } ' unexpected end of program ligne 29 : ' { ' unbalanced parantheses Thank you so much for your help ! // Expert Advisor for MetaTrader //#include <MT4/MT4.mqh> // define input parameters input int
I am trying to get the moving average value from the rsi, similar to how it is displayed in tradview indicator. I managed to write the below code but it is not working as expected obviously :D Would love any help. I want to get MA 20 (PRICE_CLOSE) on RSI of 14 Appreciate any help! Thank you! int
  Swb grid EA  (9)
Respected Senior member !! (Mrtools, newdigital, mladen and others) I got this EA(swb grid 4.1) from other forum, Exactly where I can't remember. There a member of that forum short modify this EA to (swb grid 4.1_V2) but he would not like to share it but he post his Strategy Tester there. Now my...
On the Metatrader 4 app I installed from my Xbtfx broker, I have 2 accounts. I wanted to run 1 EA on one account and another EA on another account. I attached the EA to a chart on one account, but when I switched account, the Journal tab immediately showed a log that the EA was removed. Is it not
Hello! I am a bit stumped on something. I have coded what I believe should be a working EA. And I say "should" because the code compiles with no errors and logically it seems okay to me. Still newer in my journey of coding EA's though so I could be completely off. But I try and back test the EA and
  VWAP Indicator  (6)
Hi guys, I'm trying to produce a VWAP indicator over a daily time period using the 'OnCalculate' event handler as most still use the 'start()' version. After many hours of struggling with this it works about 90%. The indicator does draw on the chart but I get an 'array out of range' error on this
  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