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...
Trying to update EA which has already been installed on terminal (on my VPS so same terminal etc) and says it's going to use one of my activations any reason why
Hello Forex World, How are you everybody? I am new in this world. I am learning about Forex everyday. During learning period, I have found an IDEA. It is very simple. The IDEA is, in a single candlestick I want to open a trade if this candlestick goes up or down 10 pips from it's open position
hello i wrote an EA that opens positions based on signals from a custom indicator (icustom function) but once one position is opened the rest of the currency pairs stops showing the custom indicator and the EA cant get anymore signals until that position is closed. I tired using multiples of the EA
I developed an EA and tested it on 1 minute time frame, it worked perfectly well and obeyed the rules programmed in the EA. But when i tested it using the Strategy Tester and i tried to trace the result with the chart window (ie when it open sell or buy and close same), i discovered that it wasn't
Hi everyone, I've been using an EA generator to test different strategies. One problem I have come up against a few times is when the EA gets in a trading loop. It enters and exits hundreds of losing positions in the space of a few minutes. This happens because there's an overlap between the entry
// DECORATOR// A way of sub-classing more functional objects, dynamically.//// RULE// Open classes for extension and close for changes////
Take a look at this photo We sell about 5 candles, but Expert also sells the next 5 candles. When the sales signal is issued, this code covers 10 candles after the sales signal. Even when the sales signal runs out I would even get 4 if we put 10 candles in the box (MathMax(10,Orders())) if the sales
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.