Hi all, As soon as my EA open a trade, the stoploss get directly set to BE and the trade get closed bits by bits within seconds. Even when I try to open the trade manually it does this. However it does not do that all the time and it depends on the instrument. I do not have a single line on my code
Greets, I've been googling around for a solution to this to no avail. Hopefully someone else has experienced this and knows what the solution is. So CopyBuffer() expects an int handle as the first argument. This works fine for most indicators, except iVolume() which returns a long. Typecasting
So what i need to know is the BAR opening time ( SERIES_LASTBAR_DATE ) by having only the position opening time: if ( PositionsTotal () > 0 && _LAST_INCPOS_BAR_TIME == 0 ) { if ( PositionSelectByTicket ( PositionGetTicket ( PositionsTotal ()- 1 ))) { datetime
how can i solve this
Hi guys I have a Panel on My EA, With Account Balance and other EA info, currently the Panel only updates when you switch timeframes, is there a way to refresh the Panel data on every bar or every tick? the panel is created with and include .mqh
Hi, I have a dilemma, how do I write the code so that the first thread goes in first, and the second one goes in after the first so he can take the crumbs after the first thread, I know I need an if statement, but how do I do it so that it will be good, and when he has finished trading the first
There was an EA was being sold on here it was trading EURUSD only and it got removed and i never heard of i don't know why despite its being insanely profitable but the thing im trying to remember it but i don't know its name exactly and i cant find
In a hedge account what would be the formula to calculate the break even price of my buy and sell positions (of one instrument) for example if I bought 3 lots at 200 and sold 2 lots at 150 how would I calculate where my break even level is for all 5 positions. obviously if I had an equal number of
Hey Community, i want to use hotkeys (keyboard buttons) in visual mode / strategy tester and also CHARTEVENT_MOUSE_MOVE to put some extra functionality behind the hotkeys that triggers like as normal in OnChartEvent -> CHARTEVENT_KEYDOWN & CHARTEVENT_MOUSE_MOVE, while the tester is running. Anybody
in his book that teaches MQL5, he taught readers using his own library, where he has his own trade class functions. Isn’t better to just use the standard library ? does he only mean to teach us the logic behind the class functions? or does he really want us to use his library/make up own? i feel
Hey Im trying to build an EA that will recognize divergence. In order to do so I have multiple arrays in place, with the largest being 90. I keep going though the code but im not able to find what causes the error. I would really apreciate the help I'm even testing to see RSI value and it is 0
[Deleted]
Greetings, I have been coding on MQL4 for a year and have recently transitioned to MQL5. After a Backtest is completed,(non visual mode) MT5 always takes approx, 15 minutes to generate the Backtest Report and Chart with deal maps. In MT4 Report this is generated < 1 minute. Please My See my Attached
Hi, I want to do some analysis of the data within the Oninit() function before entering the execution. The data I want to analyze are the ones of an indicator and for this reason I am using the CopyBuffer function : handle = iCustom ( _Symbol , PERIOD_CURRENT , "Custom\\indicator.ex5" ); double
I'm trying to insert to an exsisting array new values so it will be in an order. I want to insert new int value in the [0] location and that the exsisting [0] location will be moved to [1] etc... I went though the docs and i havent found a way to do this.. Does anyone know of a way? or have a code
Does anyone know how i can use the MQL5 Cloud Network available agents while running optimization backtests instead of only using my computer's core agents
Dear Members I am getting warning message "implicit enum conversion" on the following code sigDIRatio = (prevRatioDI < currRatioDI) ? (CENUM_TREND)LONG : (prevRatioDI > currRatioDI) ? (CENUM_TREND)SHORT : WRONG_VALUE ; Type casting did not help either. Is there any fix to this warning? Regards
I need someone who can guide me on how to code trading robot based on the divergence between price and RSI indicator. I can't find someone who can do it for me very quick. The robot must pick trades on the divergence that are on the support and resistance only. The robot must have an ability to
I just saw there is a DDE solution for MT5 that comes with it own DDE-Server! Now I am wondering why there are quite some attempts for trade-copiers based on pipes and sockets but not on that quite simple DDE which exists for Windows XP,Vista,7,8,10 and even Linux/Wine and probably MAC. One only...
Can someone put here a very easy code in MQL5 to open and close a position. I tried this: PositionOpen , but it doesn't work
As I can request a password from the user so that he can remove the EA from the meta trader, I tried simply putting a return; in the OnDeinit event but it didn't work, AE disappeared from the screen
Hi. It is possible to convert the PERIOD and the ENUM_TIMEFRAMES (PERIOD_M1, PERIOD_H1, PERIOD_D1, etc...) into something like numbers, in example an int variable? In example it is possible to convert PERIOD_M1 into an int? something like int peri = PERIOD_M1; this is useful for me, for in example
I am using the latest build - 3950. If a single agent is enabled then no problems, there is no elevated memory usage and disk usage is near 0% as well. If I enable 2 agents then disk utilization goes to 17%, and the transfer rate is about 500 MB/sec, which goes on as long as the backtest runs
// custom callback for processing deals typedef bool (*DealProcessor) ( ulong ticket); bool DealProcessor_DEAL_ENTRY_OUT( ulong ticket) { return HistoryDealGetInteger (ticket, DEAL_ENTRY ) == DEAL_ENTRY_OUT ; } bool DealProcessor_PROFIT_ANY (ulong ticket) { return HistoryDealGetDouble(ticket
Hello friends My code works like this: In line 56, when the risk becomes 2 to 1, I want the trailing stop to be activated and the trailing stop to go up with each point that the price goes up. For this, I used to store the current price in a global variable. But when I opened several positions at
Hi, I have an issue with file opening during optimization, if the test is ran on visual mode or EA is attached to a chart, the file opening always succeeds, if the file is less than 1.3MB out of 100 passes, the file opening may fail less than 7 times during optimization, with a file greater than
Hi, recently I observed the issue that the MQL method PositionGetTicket() failed. It returned 0 for many, many trials. If this error comes up I still can place orders. But it would be interesting for me to know what a reason might be. Broker error, broker blocks something, merket closed, delay
Hello, As I said in the title, I'm new in automated trading and I don't understand how works the script Multi_BuyStopOrder : https://www.mql5.com/en/code/44035 I know TP should be upper than the price asked and vice versa for SL but, I would like to trade immediately (and not wait for an asking
When using the Python Integration functions history_orders_get() and history_deals_get() , I've noticed that the returned orders and deals always seem to be sorted by their execution timestamp in chronological order. If I can rely on this ordering, it would simplify my logic and enhance the
When it comes to cryptographic algorithms in MQL there is a lot of scattered information and it is difficult to put it together, especially if you want to implement an analogous function in another programming language. I thought it was worth starting a thread where we can share implementations. I'm
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.