MQL4 and MetaTrader 4 - page 180

Hi, I have problems with OrderModify error 130 and 'OrderModify 1, but I don't understand why, this is the code from where I modify it void OpenTrade( string sym, int tmode, double tsize){ int err = 0 , ticket = 0 ; double TP = 0 , SL = 0 ; if (!IsTradeAllowed()){ while ( true ){
Need to close order when price reaches to certain level. its simple but I couldn't make it. I am a newbie, appreciate your help. example below. double Ticket, Openprice, Lot, Tp=150; Symb= Symbol (); // Security name for ( int i= 1 ; i>= OrdersTotal (); i++)
[Deleted]
Hi seniors, In the MetaTrader Trade Terminal, I see the following figures (and my understanding of their meaning -:)) - Balance: the amount before orders are placed - Equity: balance + gain/loss not yet realized of open orders - Margin: this figure is set to be different from dealers to dealers. For...
Hi, Lately when I open my MT4 platform, there is a gap in data(candles) on the chart (attached chart with missing data - the blue area). I think it is because an indicator I attached to other chart. The data(candles) isn't fill even when I right click and "refresh chart". I only succeed to fill the
Hi! i found a indicator script on the net which suit for me . this indicator draw and alert when crossing specific above and below line. But one lack of function is when break out line it alert but there is no limit bar . i want to set 5 bars so if i set 5 bars i want to receive alert in 5 bars
Hello, I am using an EA within MT4. I want to do specific things without changing the EA's code. 1. Is it possible to limit the push notifications to my phone? For example I want to receive alerts for TP, SL, margin call,open order etc., but not for changes regarding editing the TP or SL. 2. Is it
  MT4 on Mac  (6)
Hi, I'm unable to install the MT4 platform on my Mac (macOS Mojave). Is the problem the older mac operating system? I'm reluctant to upgrade my OS since I then experience power shutdown problems. Any suggestions
hello i have a indicator which check break out price line. here we can see Red line is sell line and Blue is buy line. when price break Red sell line i want to get alert vice versa Blue buy line. but i want to wait upto 2 bars until Red or Blue signal bar break out signal bar. for instance, below
[Deleted]
Hello everyone I want a code, but whatever I think I can not get the result We have an expert who opens 1 position in a row with every 10 pips (We have no problem so far) Now I want to write a code that checks all the positions with the opening of each position to see where we are at the opening of
hi, i need your help on both indicators. I would simply like to add that the alerts are only triggered on closed candle because otherwise I have too many false signals. I would really like very much that you can make me this very small modification. I am a young student so I would like to do it
Hi I wrote a test ea and while back testing , MT4 stops and i see this message in the journal tab: Access violation read to 0x00000003 in 'C:\Users\H\AppData\Roaming\MetaQuotes\Terminal\E05C74117B3E2588F72872BDDB509419\MQL4\Experts\2020-Test.ex4' after that if I click on start button again MT4
Dear Forum members, I am using Metastock and Reuters DataLink for my data feed, and have created some proprietary indicators / models. Some of these indicators use data not available in MT4 as provided by brokers. I would like to have these indicators into MT4, but I am not sure how to achieve this
Hello, I am still learning MQL4. I have written this code as part of my EA. double maxLossDollar = (MathRound(AccountEquity()/100) * 100) * maxLossPerc; Alert ("maxLossDollar: " + maxLossDollar); The above code Rounds up to nearest 100 when the balance is between x50.01 to x99.99. Any guidance
If I were to develop an expert advisor using indicators with different timeframes, would it work only being installed in one chart on MT4? For example: I'll use EMA on H4, and then MACD on M15 double MA = iMA ( Symbol (), PERIOD_H4 , 26 , 0 , 1 , 0 , 1 ); double MACDBase = iMACD ( Symbol ()
Hi, Im still a newbie though. Maybe i still havent discovered smth yet, bu I was wondering MQL has callback functions for whatever events are happening. The similar way you have a start() or init(), having functions like on_order_close() or on_new_period_start() would be nice. Event driven...
iBarShift - MQL4 Documentation states that when a match is not found it returns the nearest (exact == false). In tester (Build 500) on M15 bar <2001.02.19 01:30>, iBarShift returned 11, for a request of <2001.02.18 22:00> Time[11] = <2001.02.16 21:00> 49 hours earlier - Last bar before market close...
I am trying to open trades in loop depending on the variable value (4,6 or 10 trades) but it sometimes miss the trades, meaning if its supposed to open 10 trades then it will open only 8 or 9 or 7 trades , and if its supposed to open 4 trades its ends up opening only 3 ,2 or 1 trade here is my code
Evening people. Second time posting and the feedback is incredible really pushing my learning along. so my final issue with this EA is i backtest it yet it places no trades at all. Sometimes ill see it says "limit" trade and even then it wont be filled. Below is my code and any corrections and advic
good day guys i have a question about deleting pending order on ecn account , the orders type are sell stop and buys top i use a simple function to delete orders , as below void ClosePendingOrder() { for ( int i= OrdersTotal ()- 1 ;i>= 0
hello all, can you help me for my code please? I placed an ARROW in this code(the code shows an ARROW when price break the highest(object named "BoxBreakOut_High") or the lowest( object named "BoxBreakOut_Low")),the problem is it does not work well because it saved all the previous day HIGHEST and
[Deleted]
On nt4, where it says expected slippage e.g. 2.60 - is that in pips
I'm fairly certain this is a ticket selection issue but I can't quite work out where I'm going wrong or how to fix it. Basically, if my entry indicator changes direction it should close the open trade, it's not currently doing that... it just keeps it open and I get error 4108 or 4051 in the
[Solved: turns out I had created an enum called "OrderType" in another file which was shadowing and wreaking havoc. ] Hi all, I'm stuck. For some reason my OP_BUYs are working, but when I try to open a OP_SELL, OrderType() always reports 0. I'd be super-grateful if someone can help me with this
In my EA I have a simple trigger to send an email something like this: bool email_sent; [....] void OnTimer () { if ([no positions]) email_sent= 0 ; if ([positions open] && [some indicator > some value] && email_sent== 0 ) { SendMail (header,body); email_sent= 1 ; } } It works nicely
I am invested in a scheme whereby a company offers algo trading and any profits are shared between myself and the company. From Jan 2021 to now they have never made a loss. I am half convinced this is a ponzi scheme. In addition I noticed that their broker is in a country where financial oversight
I am facing a difficulty in sending an alert mail when a certain condition is met. I want it as an alert mail for the manual trading so that I am with the trend . This mail has to be only once when MA50 is above MA200 for sell position and viceversa. I have done workaround with the Ordermodify ()
Good morning Can someone explain me what the const before a function does? bool ReadOnly( void ) const { return (m_read_only); } //with const bool ReadOnly( void ) { return (m_read_only); } //without const does it make a difference if the function returns a fucntion or
Hi all I'm converting a code from MQL5 to MQL4. In code, i have faced BarsCalculated() which i need help to convert it to MQL4. This is the code which computes and draws Zigzag on RSI indicator (=Zigzag with input of RSI values, rather than price values)
Hello everybody, I'm trying to create a expert advisor (mql4) with multiple dialogs using standard library. Foe convenience all the components inside dialog are prefixed with dialog name. This is what I got so far, so there is one problem that I cannot figure it out: when user click inside dialog1
  A simple program  (3)
Hello, I am a beginner in programming and at the moment I am trying to learn to code with the mql4 language. I am trying to understand the concepts of function variables, predefined variables... But I get stuck on my program and I can't find the errors... I wanted to create take profit and stop