Hello! If I place a Market order on OnTimer(), Market is open But there is no tick coming in that moment , order will still be sent? Let’s say I want an order to be send if TimeLocal() >=some_datetime. Last tick was received 15 seconds before some_datetime. This order will be sent? I want to use
Theres only 2 errors and i cant seem to fix it, ';' - unexpected end of program (line 80) '{' - unbalanced parentheses (line 31) double entry_price = NormalizeDouble(price, MarketInfo(Symbol(), MODE_DIGITS)); double sl_price = NormalizeDouble(price + StopLoss * MarketInfo(Symbol()
I'm trading BTCUSDT which has a minimum stop loss of 50 pips. My stop loss is roughly $5 away (0.02%) for every trade. Only about 10% of the trades actually go through, and every time it throws an error I print the price, SL and TP. All the calculations are correct and exactly the same when it goes
Hello, I faced a strange error. I'm using ontime function based EAs and recently some EAs stopped with message "cannot set timer (xxx)". As you know, ontimer function requires 'EventSetTimer(xxx) to run the function repeatively. Have you guys ever met this kinds of error? Thank you for your feedback...
Good Evening, I've a problem with my customized indicator. That is, when I go to emulate it on multiple crosses and let it work for hours without closing the windows, this indicator continues to vary from cross to cross. which should remain the same because it has to calculate the same series. What
hello all ,, can u help me to modify my code ?... i wanna build strategy like this https://telegra.ph/file/fbdc32ed144011a1c8c0a.jpg with Fxgen and the model is like this https://telegra.ph/file/10ac5ab589d8a46a05554.jpg as u can see the model is not simple ... if the order reach Buyorder5 and
Hi there, I'd be very grateful if any programmer out there could have a look at my code? It compiles with zero errors but when I install it in MT4 Strategy Tester it generates zero trades... What have a missed out? Its just a simple MA crossover strategy using the RSI and Stochastic indicators as
Mt4 on my Samsung stopped displaying charts. No error message just a static image of three candles in monochrome appear. Screenshot attached. No indication that a chart is even trying to display. Everything else in the app works fine. App was updated, same result. Same if symbol is changed. Any
When running my EA on MT4 Demo account, it seems to only trade in one direction when backtesting. In the journal it shows the Buys and Sells, but the Sells show an error 138. What does this mean and how do I fix it
[Deleted]
The documentation for print (https://docs.mql4.com/common/print) says: "It enters a message in the Expert Advisor log." Where can I find this log?
Please assist me
I have a calculation for finding the Price from MA100 and MA50 shown in the formula below. How do i, 1; find all the price points where this has happened so that i can indicate on screen and 2; if MA100-MA50, how do i rank the last three prices from the subtracted difference? for ( int i = 0 ; i
Is there a near universal method to convert price difference between open and close of any symbol bar to pips . One that works with even exotic pairs and indices . Is it even possible ? I am currently using the follwing code for the purpose . It works great for most of symbols from the marketwatch
In this code there are 2 buy conditions, but i just want to open 1 deal every one condition to be the total deals are unlimited, but every buy condition is equal to just 1 deal extern int MagicNumber= 10005 ; extern double Lots = 0.1 ; extern double StopLoss= 0 ; extern double TakeProfit= 20 ;
Hi all, I want to open a broker in my region. I want to build a MT4 server for testing first so I like cheap service. Anyone know about this, please kindly share. Thank you
I am new to Forex trading and I know next to nothing about MQL4 coding but I would like to get this code working. I will appreciate your help. The errors from the MQL4 program are: 1. 'close' - invalid array access 2. 'ticket' - variable already defined. I have made the lines the errors refer to
Need help to run backtesting using MT4 faster, What do I need for doing it ?
The new released version of the mobile trading platform MetaTrader 4 Android has fixed issues found in the previous versions and features the Crosshair mode. The updated application now allows users to easily view the date, price and indicator value at any chart point selected. This makes for more...
[Deleted]
High[0] Low[0] Close[0] all return the open value of the bar... am I missing something here?
(12 1 2)
High[0] Low[0] Close[0] all return the open value of the bar... am I missing something here? Doesn't make sense why if I do the following: Print("Open = ", Open[0]); Print("High = ", High[0]); Print("Low = ", Low[0]); Print("Close = ", Close[0]); They...
{ // Get the current fast and slow moving averages double fastMA = iMA ( _Symbol , 0 , FastMA, 0 , MODE_SMA , PRICE_CLOSE , 0 ); double slowMA = iMA ( _Symbol , 0 , SlowMA, 0 , MODE_SMA , PRICE_CLOSE , 0 ); // Determine the trade type based on the moving averages if (fastMA >
I'm Italian but I need an mt4 terminal in English to be able to make video explanations to my customers, I just don't understand how I can change the language of the platform. Can you help me
// Declare global variables extern double LotSize = 0.01 ; // initial lot size double MaxLotSize = 0.05 ; // maximum lot size double MinLotSize = 0.01 ; // minimum lot size double RiskPercentage = 2.0 ; // risk percentage per trade double TakeProfit = 0.0 ; // take profit level double StopLoss =
//This Week Profit int WeekTime= iTime ( NULL , PERIOD_W1 , 0 ); int WeekTimeLast= iTime ( NULL , PERIOD_W1 , 1 ); double ProfitWeek= 0 ; int WeekTrades= 0 ; for ( int z=(OrdersHistoryTotal()- 1 ); z>= 0 ; z--) { if ( OrderSelect (z
Hi, After updating/installing the latest MT4 Android Build 1357 yesterday (09MAR2023) from Google Play Store, my MT4 Android app didn't work anymore (the phone just didn't wanna load the app), so I had to uninstall my MT4 Android app and download/install the latest Android Build 1357 again. However
[Deleted]
How to remove the dotted line that shows your opened buy/sell positions in the chart? It just gets too crowded on the chart when I add other lines and indicators and drawings and I can't see what's most important for me - the trend line.
Hello there, I have downloaded a program called Closing all open Orders on MT4, it was working until yesterday like a charm, now it stopped. I can't see how to fix that, any help would be much appreciated
Trying to find the cross over between the two RSI's, then the Price at the crossover. This is what I've tried to do but comes with a 0 value, i am looking for a price value. Also i need a tolerance so that the difference could be close to 0 which is good enough. int RSI() { double
Hi, I know this has come up many times before but I still cannot work out a generic way to calculate the account currency swap (typically USD) for ANY symbol (whether currency, commodity, equity, etc.) See below for example code which leaves a lot of questions. Here are some: (1) why is Tick Value...
Hi all, I encountered a problem that my indicator arrow didn't show properly. When I first added indicator to chart, it showed correctly. But if I scroll to the earlier date , the position of arrow was totally a mess. Please check chart below which is normal Please check the chart below which is not

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.