MQL4 and MetaTrader 4 - page 171

I'm still learning how to code an EA but I face a challenge while doing it. Here's what I'm trying to achieve... I want the code to open a trade only if there is no open trade during that specific candle. I do not mind having a new trade opened on every candle (multiple trades running at the same
Guys, I'm hitting myself to try to extract the data from the string below. [{"type":"success","message":""},{"id":"14058","symbol":"EURUSD","tp":"1.2271","sl":"1.2217","direction":"buy","risk":"2"},{"id":"14059","symbol":"EURUSD","tp":"1.2260","sl":"1.2190","direction":"buy","risk":"2"}] Note that...
way the ea robots not trading on my mt4 platform
  Metatrader 4/5 never opens  (11   1 2)
Hi, I have a problem I never encountered before using either MT4/5. It started like 2 weeks ago, after I got an update tab for my MT5 (the usual one you get, which closes your app and restarts it again updated) - I had tons of them before. But, after this update, my MT5 never opens again. I click it
[Deleted]
  Disk space C full  (15   1 2)
Hello, I am backtesting quit a lot and since this evening I noticed I wasn't able to make another backtest, due to a full harddisk I also recieve a MT4 journal message: TestGenerator: write file error. As I only use this computer for forex related stuff I didn't put junk on it,.. Actually the only...
Very new to mql4 and programming in general. I currently have several boolean variables declared in this fashion: bool ShtRev = High[0] >= HiZone && MidPoint < Low[1]; bool ShtSzeCatLrg = ShtZone / (RangeHi-RangeLo) <= SizeCatLrgMax && ShtZone / (RangeHi-RangeLo) >= SizeCatMdMax; bool LngSzeCatLrg =
Hello dear MQL members, I have downloaded 3 MT4 demo indicators from the market using MT4. When I try to backtest them in the strategy tester, MT4 freezes. My computer has high spec... Can someone enlighten us into why this is happening and if there is a solution to this issue
[Deleted]
Hi Is it possible to automatically change the Candle Size when i zoom out or zoom in? When i zoom out for example, the candles are getting into each other, which looks like a mess (third Picture) I am using Heiken Ashi Candles, mq4 File is attached. I think i need to write something like: If zoom 2x...
Hi friends I successfully created my first EA. With an initial deposit of $1000 it creates a profit of $780 each month (using a spread of 0.1 pips). It has an average of 300 trades (round trip) per month. I am however not sure if it will work in a real life scenario. Do brokers (eg IC Markets)
Currently, the EA will open a buy position on certain conditions, or will open a sell position on certain conditions. I have no experience with MQL scripting, and wanted to know what would I need to change in the script, to simply have it do the opposite (instead of opening a buy position it'll
I tried to get trading session by following codes but something wrong ,I not get correct trade session. example ,current is london session in my local but not get that value in codes can someone fix this issue .I need help I want to close trade in asian time and open trade london and us time #import
There is an issue in the following method of the CAppDialog class: //+------------------------------------------------------------------+ //| Create unique prefix for object names | //+------------------------------------------------------------------+ string
I am learning to compose indicators. I changed the official RSI a little. Most I do is changed the final step of RSI formula. For practice, the idea is to calculate the (net profit in pips) / [total rise pips + abs(total fall pips)], windows = 20, time frame is M1 or M5 The main loop is shown below
  Division remainder %  (11   1 2)
Up until now, I guess that I have only used integers when using % in my code. double remainder = 100 % 30; works fine double remainder = 100 % 30.1; Compiler reports error '%' - illegal operation use as does double remainder = 100.00 % 30;double remainder = 100 % 30.00; So both values have to...
Hi im using an expert and was working fine until yesterday, I run it on a VPS and now it uploads but instead of running I get this error. 2021.07.27 14:02:41.152 cannot open file 'C:\Hosting\instances\AC0BE3CF85784E540E546BDF4FF7EA70\MQL4\Experts\GODMODE 11.ex4' [2] The strangest part is older
Closing by order sequence. How to create a loop to check ? if i.e. order 1 + order 2 has profited - close order 3 + order 4 has profited - close 5 + 6 7 + 8 9 + 10 and so on ... Order 1 being having the smallest order number and was opened at the earliest time
Hey Traders, Kindly help me on how I can set email alerts from MT4 to my email address. I was using  the set up in tools, Options, mail and used gmx.com. However it does not work anymore.
I changed a little on the official RSI indicator, but it does not work. No error in compile. Please anyone give some comments. Thank you
I'm trying to save supply&demand zones, now i'm not sure how to do it. I was considering 2 options (but if there's better ways let me know). OnTick(): Loop through the past x amount of bars, and draw in all the zones, fill it in a 2d array or something, clear again at every tick. OnTick(): Just
  Variable problem  (2)
Hello to all, For some time I have been trying to get the number of consecutive maximum losses at the end of my backrest in a variable but my program returns a completely different number than what I see in my program... here it is: double OnTester () { MaxConsecutivesLoss =
Hello I am quite new in mql4 programming and recently I build my own EA which should execute pending and market orders at a specified price. So, this is the code I wrote and yeah there is so much junk, but it works. The only problem I am facing is when I look at the results after running the EA I
Hello guys. Iam trying to count current profit for all buy/ sell open orders. I got so far: double CheckBuyProfit(){ double profit=OrderProfit() + OrderSwap() + OrderCommission(); if ( OrdersTotal ()> 0 ){ for ( int i = 0 ; i < OrdersTotal () ; i++ ) { if (
The following example is using iBarShift for parsing datetimes 🙂 input int Hour_shift=-5; //Hour shift input int Hour_start=1; //Start hr; 0-23 input int Minute_start=0; //Start min; 0-59 input int Second_start=0; //Start sec; 0-59 input int Hour_end=9; //Stop hr; 0-23 input int
The Code is working 99% properly my real Problem is the While Loop I use it that way: while (bar< Bars - 1 ) But the way I need is: while (highNumber>Close[I+ 1 ]) But when I use it that way the whole System crashes. Pls See my full code: //--- //Special Loop to avoid Array Out of Range int
Hey coders, sometimes I need a tick, may it be on a weekend or during quiet market times. I thought about forcing a tick by calling OnCalculate() from a chart event. This was my first idea: void OnChartEvent(const int id,                  const long &lparam,                  const double &dparam...
hello traders i hope u are in good health i have a question for making indicators and experts secure for the market, because I want to upload my own. if somebody pays for my indicator, he can download it as ex4-File. now he can take an ex4>mql4 compilier and delete the limitation for his account and
hi i am making an EA that will send order only on new york session, but im confuse on how will my EA know if the time now is in New York session. What reference or function do i need
[Deleted]
Right, so one again, and for the millionth time in a day (because God forbid should my life just be easy for five minutes) MT4 Freezes every time I load an EA onto a chart. Any thoughts? Or is my platform has just decided to say "Oh, yes, I remember you - I'm going to be an arse today & make your
Dears, I have been trying to achieve this one-way communication between two sperate account in two different brokers.. I even tried to make those two accounts within the same broker but still no feed is being sent through, not even the error messages being displayed. Sender #import
[Deleted]
Morning folks! I have a TFJ here. I am literally incensed right now. I am absolutely fuming. The stupidity of the way in which MT4 handles my EA is beyond me, and how on earth anyone could release an application onto the market is nothing short of amazing. I have been coding for 4 years now and I