Expert Advisors and Automated Trading - page 131

Hello and greetings to you all potential helpers. The error message log attached indicates 5402, which according to CalendarEventById - Economic Calendar - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5 , signifies: ERR_CALENDAR_NO_DATA (country is not found)
Having trouble finding out what’s cause this error in my code. Very green at this and after some help. It’s a very basic EA, just want it to actually work and will build from here. #property version "4" #property strict #property indicator_separate_window #include <Trade\Trade.mqh> // import
I am a newbie to MT5. I have a couple of Indicators that I am trying to create and for which I receive just 2 errors when i try to compile them. Would someone be kind enough to point out to me what I am not getting. //+------------------------------------------------------------------+ //|
Hi Can anyone advise: I want to obtain the values derived from the mql5 Standard deviation channel ( OBJ_STDDEVCHANNEL ) this I can do using ObjectGetValueByTime in my code which is simple enough but I wonder if this can be done without creating the channel object on the chart as this affects
hello members, i am trying to count closed trades in a day but it is not working and all the values i am printing in the for loop does not get printed . Any help would be much appreciated thank you. #include <Trade/Trade.mqh> #include <Trade\PositionInfo.mqh> #include <Trade\SymbolInfo.mqh> CTrade
Hello, friends. I'm a brazilian junior developer. I operated manually for some time in brazilian futures market (Mini Indice/Index "CODE: WIN" and Mini Dolar/USD "CODE: WDO"). When I learnt something about coding, I decided to create some EAs to automate a lot of my ideas. But they're really fast
Good day, how do I get the Parabolic SAR value for the previous candle
Hi all, I am looking for an MT5/MT4 EA developer. I need my trading strategy put into an EA. It's simple enough. Anyone open to having a chat? Let me know. Thanks
faq says is possible use event in mql5
Hello! I am coding an EA that uses 3 moving average indicators. The indicators are visible on Strategy tester but they are all the same color. I created a template with the same name as my EA and set colors but this created problems of its own. problem 1: The old red indicator lines are still
Hey guys, was wondering if anyone could help me with my simple RSI EA, it opens very few trades, but basically I want it to open a position based on a candles close, if the RSI is overbought or oversold. I also want it to exit positions on the opposite signal. Here it is
Hi all. I am migrating my EAs from MT4 to MT5. Yesterday I ran some back testing and worked fine. Today I get this error. and MT5 won't let me run optimizations. Says: - debug version of "Advisors\EA.ex5" detected - optimization cannot be started Thank you in advance for your time
Line 1 says: 'expressions are not allowed on a global scope = "Copyright © 2023, MetaQuotes Software Corp." Line 2 says: ')' - unexpected end of program= Buy trade order = mt5.order_send(symbol=symbol, type=mt5.ORDER_TYPE_BUY, volume=lot_size, price=mt5.symbol_info_tick(symbol).ask
Hi everyone, When I attach my EA to the chart it can create and read files no problem. In the tester, I can create files, but when trying to read them I get ERR_CANNOT_OPEN_FILE. //function to save results to file void save_results() { for ( int i= 0 ;i<TDs;i++) { string
I want to use PositionClosePartial to cut my position in half when it gets to a scalp profit. But the PositionClosePartial call always returns false. It does not change the volume. When I check the retCode it is 10009 which I believe means success. Something is not right. I added a few debug
Hello, I want to subscribe to a signal, but it says "The volume of trades copied may not coincide with the initial trade volume of the provider. The volume parameters of the symbols are different". As you can see in the attachment, I opened a 2000 dollars demo account on FBS 1:100, which corresponds
I'm using multi symbol ea with classes and need to get close of last bar but through the usual method with MqlRates I get last close only for the 1st pair in list. bool CTradingEngine31::SearchTradingSignals( void ) { MqlRates rates[]; ArraySetAsSeries (rates, true ); if (
Hi to all! I have a great problem with XAUUSD spread on MT4... could you help me please? If I have for example, on MT4, XAUUSD at 1800.00/1800.20, the broker spread is 20 pips. But I was told that spread in MT4 strategy tester is in points. So the question is: if, for XAUUSD, I have 20 pips of
There is a long deleted project but the name keep appearing in my "Shared Project" folder. This shows ups as an empty folder. In the pop up "Update from Storage" is not disabled. When I click that I get: 2023.03.26 21:39:58.519 Storage Could not find the requested SVN filesystem (720003) Which
Hello everyone, I'm looking for a simple ea but I don't know anything about coding, I need help. I would like an ea that goes long at the close of a bullish candle, keeps that trade open until the close of a bearish candle and at the same time closes for as long, will take a sell trade, that sell
How can i close all other chart windows and open a chart window with specific symbol
I would like to get that EA to trade only one deal per signal but while testing this EA I noticed that sometimes it opens two trades at the same time or it opens a trade after signal and then another trade comes one bar later. //+------------------------------------------------------------------+
Hi I want to have a function that I can call from on Tick() that returns a bool if there is a new candle or not for a specific timeframe. I've come up with tis but it's not working properly. bool isNewCandleFormed( int timeframe) { static datetime last_candle_timeM5 = 0 ; static datetime
Hi, How can I calculate the loss at SL? This value indicated here. I have tried using the tick value/size but it's never accurate accross all pairs - mostly fails on gold and indices. Thanks in advance for any help
ResultRetcode Gets the code of request result. uint ResultRetcode() const Returned value The Code of request result. How can I get the result using the above function? in CTrade class I mean. Thanks Please give an example.
Hello, I made a trade asistant which works on forex, but on futires not. This asistant works like this, I click on the chart, and there it will be stoploss, and if click is below Bid it will open a Buy and if click is above Ask it will open a sell. The thing is that for some MiniS&P for example
Hi I have no knowledge of code however I manage to get the first part of building an EA via comparing input from another EA. The last part i have some difficulty, can some one assist me to fix the errors please. I have attached the file ***
In MT5, there is a checkbox to select the "Show trade history". It is the last item on the tab "Show" of the properties window of a chart (click F8). I would like to know, how I can (de)select this property by code (in mql5)! - Usually, I would expect to use the functions ChartSetInteger() and
hello dear friends i need help about martingale trading system for make a strategy that i don't lose more than 3 trade consecutive { i mean if i lose in first trade or even in second i must win in Third trade } pleas any one that know such this strategies introduce me or advice me . thanks so much
Does anyone know an EA that closes all open and pending orders and also the currency pair when another EA reaches a certain profit on the day either with one or several trades