https://stackoverflow.com/questions/58228952/how-to-update-variable-from-with-if-statement-mql5
Once a virtual server (MQL5) has been set up on a MT4 platform, when you synchronize the EA's does it sync on all profiles on account or only the one that is open at the time
I thought that defining candles that had bodies 80% bigger than the wicks would result in momentum candles. I found out that this analysis was seriously flawed. Mainly because even in consolidation you can get candles that satisfy my above condition but aren't momentum candles. How can I use the
hello there i have this 2 moving average cross over Robot . first cross is sl and 2 cross over will be trade. how ever i want when the trade open and market move 100 pip the sl should be modify to break even but when i used orderselect outside the if statement it print the value of OrderOpenPrice()
Hi there, need to filter open positions from the pool by its symbol to properly calc its breakeven. Through this code, I can get just values from the chart symbol: If(PositionGetString(POSITION_SYMBOL)==_Symbol){ Also tried this way but makes no sense
Hi, I've wrote an EA using 3 indicators as starting sequences and a TP and SL to stop the placement. Unfortunately my understanding of the mql4 language is pretty new. I found that there where 43 errors in my script and I'm not sure to know how to correct them. Where can I find someone to correct my
Hello Everyone, I would like to know if is possible to add some kind of event when the user press the key tab to jump to the next CEdit object in the panel. I already know how to capture de key press from the OnChartEvent, but I don't know how to manage these objects to create these event. Thanks
int init(){ RealPoint = RealPipPoint(Symbol()); } void OnTick(){ double MidMovingAverage = iMA(NULL,PERIOD_H4,7 , NULL, MODE_EMA,PRICE_CLOSE,0); double SlowMovingAverage = iMA(NULL ,PERIOD_H4,10,NULL ,MODE_EMA,PRICE_CLOSE,0);
I started a signal subscription on an account I was running on my local computer. Since the account has to be running all the time I want to move it to my server and another broker. How? Unsubscribe and subscribe? I have only run it for 2 days so what happens to my paid subscription fee
Hi all. Just poking around in MQL5 for the first time. I thought I'd start with something simple, print to the journal on the first tick of a new bar: //+------------------------------------------------------------------+//| learning.mq5 |//|
When first downloading data for EUR/USD and GBP/USD for backtesting the download appeared to start at 49%. It then produced these errors in the log and did not complete the backtest: 2018.12.23 10:33:34.195 Core 1 EURUSD 2018.02.27 03:23:00: corrupted history detected (s:-2100596776, o:121546,...
Hello, does anyone have an idea how to get the calc mode back? here its written, that the calc mode is a part of SymbolInfoInteger https://www.mql5.com/en/docs/constant_indices but i cant use SymbolInfoInteger(_Symbol,SYMBOL_CALC_MODE_FOREX); any idea? amando
Hi, I'm an absolute newbie, and I think I need some help. I need to make a very simple EA, that buys if the closing value is higher than opening value, and sells if closing value is lower than opening value. Please, I know your time is valuable, but if could give it a minute I would really
As the title says. How do I access individual position's information? The thought that comes to mind is looping through all of them and checking them one by one untill I find the one I want. But how do I do that? If this was some other programming language I could do this but this doesn't work here
Have this code to get Breakeven from a deal: double Breakeven+=Volume*OrderLots; By the way, it doesn't work if there's just an order, so I set BE=OP as default. So how should I set the code to filter when it's more than one order on the same symbol in the same direction from a single chart? Tried
I have found Pip Calculator in MQ4: https://www.mql5.com/en/code/12418 . I need the same thing in MQ5 and with any currency pair. For calculation of any currency pair there are as if three cases described in picture attached. Can anybody help?
Hello, I'm blocking on a code. I wish to close an order with the number magic but it does not work, can you help me? void CancelOrder() { for(int i=OrdersTotal()-1; i>=0; i--) { if(OrderGetInteger(ORDER_MAGIC)==MagicNumber) { ulong
My EA reads an external CSV file containing news data. Can this file be used when optimizing an EA with a local network farm
Where can I find a bridge to copy an MT5 signal into an MT4 account? Thanks
Hi, I have an EA which places a SELL STOP order together with a SL at a distance of x points above the trigger price. Now the bid price of the traded symbol (e.g. USDJPY) reaches the trigger price of the pending order (from above) but the spread is more than x points. Nevertheless I observe that the
Hello, little question is what an EA works better with MT5 than MT4? because with my EA sometimes the orders do not open while all the conditions are ok. and at times everything works very well it's just now and then. thank you
I'm trying to code a London Breakout strategy, i have to open two pending orders at 3am and see which one's hit first then delete the other... I can get the program to open the trades but can't quite figure out how to make it cancel an order after one's hit first.. Someone on here gave me the idea
I converted the following code that I was using in mql4 to mql5 but it doesn't show the rectangles on the chart. The mql4 code is working perfectly. I get a warning " possible loss of data due to type conversion" on the set integer/double lines for OBJPROP_TIME and OBJPROP_PRICE. bool
Hi. Coders.
After back and forth on this project, I need to download exe file or dll file from website from my Meta Trader indicators.
I am talking about simple http website.
My code is able to download any other file types including pdf, jpeg, txt, csv, xml files etc, but I can't download exe...
I am getting timed out with no result when calling the function CalendarValueById(). Previous to this I call CalendarEventByCurrency(), which returns an array of events. But when I am trying to get the values for any event the debugger hangs and when it eventually responds there is an empty Value
Hello, I want to get current profits on positions on the same pair. #include<Trade\Trade.mqh> CTrade trade; void OnTick() { double Profit_1, Profit_2; double Ask_EURGBP=NormalizeDouble(SymbolInfoDouble("EURGBP", SYMBOL_ASK), _Digits); double Bid_EURGBP=NormalizeDouble(SymbolInfoDouble("EURGBP"
Hi, for my EA, I need to constantly check if a given price level was crossed. For example, if the current quote broke out the established value for a partial exit and, therefore, a market order needs to be executed at that moment. The most obvious way of doing this is constantly checking if the
Hi, I'm looking for a free EA that closes all my positions if these are together reached a defined profit. Example: Defined profit is: 100 Now: AUD/NZD: + 100 USD/JPY: - 50 EUR/USD: + 25 Current profit: 100 - 50 + 25 = +75 Still waiting Later: AUD/NZD: - 100 USD/JPY: + 250 EUR/USD: -50 Current
i test this code to serach in all my symbols and find ichimoku crosses but i have error #include <Indicators/Trend.mqh>#include <Trade\PositionInfo.mqh>#include <Trade\Trade.mqh>#include <Trade\SymbolInfo.mqh> CPositionInfo m_position; // trade position objectCTrade
All I have noticed so far is that virtual hosting is all about getting signal, auto trading, hosting indicators and copying trades. But I want to host my own EA on a remove server so that I can trade using my EA on a hand held device. My EA has trading buttons as well. Where can I get such service...

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.