MQL4 and MetaTrader 4 - page 197

Hello, i am a beginner of mql language. I am trying to initialize an array of structs but when I compile the program the system gives an error. I'm definitely doing something wrong. This is my code: struct MaStruct { int period; int shift; ENUM_APPLIED_PRICE applyTo; ENUM_MA_METHOD mode;
When I trade on MT4 demo, my take profit is good. When I moved to live, more losses and stop loss. I assume the broker maniuplate the price after I placed life trade. Is it possible? Just to seek forumers advice
I try to set suffix value to currency string I have this code //======================== extern string suffix = "" ; //======================== string EURAUD = "EURAUD" +suffix ; string EURCAD = "EURCAD" +suffix; string EURCHF = "EURCHF" +suffix; try to replace this value to this array string EUR[
double avg() { double averageprice= 0 ,size= 0,out=0 ; for ( int i = 0 ; i < OrdersTotal(); i++) //for(int i = 0; i <=OrdersTotal()-1; i++) //for(int i = OrdersTotal()-1; i >= 0; i--) //for(int i = OrdersTotal()-2; i >= 0; i--) { if (OrderSelect(i, SELECT_BY_POS, MODE_TRADES))
Welcome, because the old one is slowing down immensely. Link to previous top : https://www.mql5.com/ru/forum/134688
Hello all,   I've a very weird problem and would like if someone knows an approach to it. Sometimes my terminal get "stuck". In that I don't seem to receive any more ticks anymore. Well, the "last updated time" from the server (above the symbols window pane) doesn't run anymore. The graph is stuck...
  The NSP and the paradoxes of nature  (666   1 2 3 4 5 ... 66 67)
Dear forum members, we are looking for patterns that do not and cannot exist in nature! From that all our troubles in the knowledge of the processes and phenomena of futile attempts to cognize the world around in a chain of failures. Let us talk in this thread about this paradox, if you are not
since mt4 updated to build 1340, i can no longer see the tick data suite controls in the strategy tester the journal says '2021.08.03 21:14:24.639 Tick Data Suite: Your MT4 build is 1340 while your license only allows running MT4 builds up to 1331. Tick Data Suite module will be unloaded. so i
  copy trade issue  (3)
Hai All I have connected to a signal from MQL5. I use VPN . .there was floating trades , lot of 0.01 and martingale 0.02 Before I synchronized. then i activated the trade was copied and it took only the last trades it came as 0.01 two times instead of 0.02 . after profitable close of that trade the
  accoount balance history  (22   1 2 3)
how to get the account balance of the last 10 trades? thank you
Hello This ought to be easy but I'm finding it fiendish. I want to draw a rectangle around my non-trading hours. I can do this ok in a custom indicator, by scanning the Bars-IndicatorCounted() for the start hour of my trading day, and when I get that, draw a rectangle from the endOfTradingDay bar to...
Hi all,  My EA strategy's adapts according to various market setting which are represented by X that can take the Value of -2,-1,0,1,2. In order for the EA to be more user friendly I would like to display on the Chart the Value of X.  I used the following code:    ObjectCreate("XValue", OBJ_LABEL, 0...
Hello, I would like to know if there is a trendine price alert indicator that could send me a push notification to my android phone. I really  like  the Trendline Price Alert indicator by MOOSE but it doesn't have push notifications. https://www.mql5.com/en/code/10348 ; if I modify the code and add...
I want to have an expert advisor with following conditions. Somebody help please: 1- If the price is below of MA10=NormalizeDouble(iMA(Symbol(),Period(),10,0,MODE_LWMA,PRICE_OPEN,0),digitz) put a BUYSTOP at MA10. 2- If the price is above the
I am looking for help in trying to "call" this indicator (see attached) from my EA. icustom does not work because this indicator does not use buffers to store the values. Does anyone know how I can "Call" this indicator using an EA and get the values or does anyone know how to add buffers to this...
Hello dear traders and programmers. I have been working on a strategy idea for over months and after long manual backtesting and several adjustments I developed a fully working strategy. In this TS I scan pairs and find strong trends or high volatility symbols Then I at London break I create order
My saved input parameters changed themselves to an unknown version that breaks my EA. It rarely happens but it's at least the second time I notice this behaviour
as my title say can I store or get the last value of my AccountEquity() before it changes to its current value
This is the error I got when I running the EA. But some mt4 apps runs the EA perfect. But Exness broker mt4 gives this error to me. Anyone can help me to fix this. 
Hello every one! I am coding a robot to which I would like to add the classic money management however I am encountering an OrderSend error 131 problem that I cannot resolve even though I am sure that my error is super stupid! The code : double Lots; { if ( OrdersTotal () != 0 )
Just a quick question. If I am backtesting an EA on the Model: Open Prices Only and I then use technical indicator functions(i.e iBands ); what would happen if I set the shift argument to zero. What would the indicator value be (Value of the indicator on open?)
Hi, everyone, I wanted to convert the following MQL4 Indicator to MQ5. Unfortunately, the compiler spits the error message: ARRAY OUT OF RANGE. The error message refers to the following line in the OnCalc(): " if(close[i]> close[i+1]) ". I do not quite understand the program logic of MQL4, which is
I'm struggle to set my TP the range of the previous bar I've manage to set my SL for a SEll trade above the previous bar range but i want to set my TP in the same way RISK TO REWARD WILL BE THEN A 1:1 Code for opening a sell position, but I'm not getting the Take profit section to work Any advise
Hi, I'm new to MT4 programming. I have a set of variables (of prices) that are from custom indicators which I have placed into the following variables as per the code below. CurrentPrice = Bid; Resistance3 = NormalizeDouble (ObjectGet("R1", 1 ), 2 ); Resistance2 = NormalizeDouble
Hi everyone, I'm interested to see people's appoaches when backtesting automated strategies... Here's my journey with backtesting so far: 1. I initially started down the route of using MT4 optimisation and strategy tester to find 'profitable' EAs which I have written. I then realised the hard way
I want to copy trade this signal this provider use broker XM micro.For my copy account is FBS cent account Can I copy this provider ? Provider account(Micro account broker XM) My account(Cent account broker FBS)
This is my completed indicator code : //+------------------------------------------------------------------+ //| Smart Arrow.mq4 | //| Copyright 2021, MetaQuotes Software Corp. | //|
I would like to change the " The Block Comment command (Ctrl+/) inserts single-line comment characters in the current position: " https://www.metatrader5.com/en/metaeditor/help/development/intelligent_management#comments in metaeditor. I would like a longer version of the " The Function Header
[Deleted]
- I want tp = 100pip initial sl = - 25pip sl = +1 when profit = 15pip sl =+20 when profit = 40pip sl =+40 when profit = 60pip sl =+60 when profit = 80pip please help me, i tried to install it but i can't
  reopen a closed order  (12   1 2)
Hello, I'm trying to learn the code. But for the following problem I have found nothing in the documentation: How can I start the same buy-limit order again after it was closed? for example: buy_limit EUR / USD opened at 1.35, tp closed at 1.3510. Now I want that this order is always opened at 1.35...