int totalorder(int m){ int total=0; for(int i=0; i<OrdersTotal(); i++) { if(!OrderSelect(i,SELECT_BY_POS,MODE_TRADES))continue; if(OrderSymbol()!=Symbol() || OrderMagicNumber()!=MagicNumber || OrderType()!= m) continue; total++; } return(total);}double open(int m){ for (i...
Hi All, I am currently try to se Brief desciption of the issue: - I have a grid of orders. Each orders has its own Take Profit and Stop Loss level. - I want all orders (active or pending) of the grid to be closed or deleted when the price reaches a certain % difference from the price at which is...
Hi guys, I have problem in my code and I can't find the solution. description of my code is: 1 - use auto lot size: Auto Lot Size = NormalizeDouble(AccountBalance() * Risk / 100 * AccountLeverage() / contract, LotDigits); first order on entire history : use Auto Lot Size if order...
HI guys, I can display the default fib on charts no problem but if I want a custom set of levels I run into problems. I read the documentation here https://docs.mql4.com/constants/objectconstants/enum_object/obj_fibo which shows the code but doesn't actually use it in the example! Can anybody offer...
Hi all, Starting to play around with custom indicators more and I've hit a roadblock with the divide issue. I'm calculating the spread difference between a synthetic price and its underlying (dividing the close price of 2 pairs less the underlying currency pair) which is then displayed as a moving...
Regarding indicators and time frames in the code. https://www.mql5.com/en/docs/constants/chartconstants/enum_timeframes EI: imomentum https://www.mql5.com/en/docs/indicators/imomentum Question: Where noted and regarding the time frames. What is expected to happen when you select a static...
Hi. I want to build a Basic Parabolic SAR EA and after I write the code and start a backtest, it doesn't work the way it should, or better to say the way i want it to do. Well i want to open a new trade at the reverse point and also close the last trade too. here's my code: void OnTick() {...
When publishing a product it is not allowed to attach any external file with it as i know...but if my product in need of some audio and bitmap images files then how to publish it??
Please can somebody help me go through this code and find out why its having multiple entry, if a sell condition is true it keeps entering multiple sells, the same with buy...
[Deleted]
Hey guys, I have a problem with my pending order modify. Has anyone of you an idea? When I add this to a chart there is no modifying taking place and no error message given out. Whats wrong here? Cheers Fabian {RefreshRates();double ppoint=MarketInfo(OrderSymbol(), MODE_POINT); int...
Hi guys, pretty difficult to explain in a headline. I have this function: double ClosePrice(string symbol, int timeframe, int position) { return iClose(symbol, timeframe, position);} And I call this function like this: double price = ClosePrice("EURUSD", PERIOD_H1, 10); Now I want to define the...
Hi guys, Any one can fix this FR-ReversalPoints Indicator, Reversal Dots appears after some candles formed. please fix it.
I am just starting to learn coding. So, I tried modify a code I found on FF site, I am stuck - I don't know how to get this done smoothly. I actually wanted the EA to always use total lotsize of loosing trade to open the next trade. For example, if there are 0.01, 0.02, 0.03, 0.04 lots of four...
Hi, I want to display horizontal and trend lines description on chart, is it can be done ?
I was testing my EA with the build in Strategy Tester from MetaTreader 4. I recognized that my EA placed far too few orders because of missed trend signs. After checking the chart by my own, I realized that my EA processed the Tenken-sen wrong. Therefore I printed the retrieved Tenken-sen values...
[Deleted]
Ok so I grabbed this code from another post on this forum, which works great for closing multiple open trades based on FIFO rules. However when there is just 1 open trade to close, it's not closing. What do I need to change to fix this but not break the FIFO capability? void CloseOrders(int slippage...
[Deleted]
Hi All, back again to nag you. :-) Would anyone have a handy-dandy little MQL4 function that automatically calculates lot size (for any symbol) based on how much % risk of my available equity, and my desired stoploss size in pips? Thanks! Shawn
Hello Developers, I need your help to solve a peculiar case. My problem happens when sending TP and SL for orders. EA seeks TP of only 10 points. However when opening orders this distance is not being respected. For example, if I open a buy order by placing a 10-point...
Whats the maximum amount of charts I can have up on the metatrader terminal 4?
do you make a request to change your leverage when u havae money in your account or before that? because i always request to change my leverage but my balance stays the same i dont have any more money added to my account can someone explain me in details what to do step by step! thx in advance 👏🏾
Hi I have an existing EA and I'd like to add a filter for opening position. The filter is the ADX. I'd like to tell to the EA: if ADX is higher than 50 -> if DI+>DI- -> Then open buy trade if ADX is higher than 50 -> if DI->DI+ -> Then open sell trade here the code I'd like to...
Hi guys i am trying to download MT4 but everytime i download it, it says that it it MT5, so i cant connect my MT4 accounts. I downloaded it from the official site. Anyone got the same problem or a solution?
Hi. I need a little help on my EA coding. I found an intersting indicator and i want to make an EA of it. I am not a professional programmer, but i tried my best. i would be very appreciated if you can help me. I will attach the EA and the errors.
Good morning, this ea when I try to do the backtest returns the error 4051 in the Diary. Thanks. extern double percentage = 2.0;extern int bars = 2, stop = 100;double average_swing,entry;int ticket,bar;void OnTick() { if(!newbar()) return; if(ticket!=0) { OrderSelect(ticket...
I've been working on writing an EA for about 3 months. Only buy positions are opening, went live 2 weeks ago, week 1 -$3500, week 2 -$39, so far this week -$2. I am having trouble calling templates and outside EAs, both give signals and would like to take the trades with an EA when they both line
Hello everyone I want to ask if there is any course or a guide for MQL4 programming for a beginner. I searched on google I haven't found any, though I see many MQL4 developer but wonder from where did they learned all language skills. I know C#, C and SQl if it comes to basic programming other than...
hello everyone I need please if you can help me add in my mql4 file, so that it is only activated for a metatrader id only and when using it in another metatrader id this will show you an error message, help please
Please, When i draw a line, if Ichange Unit time the line disapears. How can i do to save it ?
hi guys i wrote this ea and i have a lot of errors for some reason i dont know i used to define my function outside oftick() errorless but for the first time i get error because defining functions can some one help please...

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
If you do not have an account, please register
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.