Expert Advisors and Automated Trading - page 48

Hi, I've a question regarding iTime function. datetime today = iTime ( _Symbol , PERIOD_D1 , 0 ); This return 2023.09.20 15:04:08.948 Test (EURUSD,M5) 2023.09.20 00:00:00 For XAUUSD the open time is 2023.09.20 01:00:00 however the return is actually 2023.09.20 15:05:09.729 Test (XAUUSD,H1)
Hi Guys, I have a question, i'm quite familiar with the stratagy tester but what i wanna know is, for example... i have a broker trial with a 10K account running for 2 weeks with a EA. Were can you see in the backtest if the EA violates the daily DD over the complete test period? Thanks in advance
When trading (with bot) on FX market my account makes a profit. When trading stocks my account goes into continuous negative equity from the first sale. Has anyone else dealt with this? What is the difference between the FX and equity market process on MT5
I know that alert sounds can be manually enabled and disabled through Tools>Options>Events in mt5. I am trying to figure out how I can play alert sounds only when specific conditions have been met. In all other cases alarm sounds should be off
#property copyright "Copyright 2023, MetaQuotes Ltd." #property link " https://www.mql5.com " #property version "3.00" input double lotSize = 0.01 ; // Lot size for order input double stopLoss = 1.0 ; // Stop loss in points input double takeProfit = 1.0 ; // Take profit in points int
input double mRisk = 2; // MM Risk input int SL = 175; // Stop Loss (Points) //+------------------------------------------------------------------+ //| Money Management | //+------------------------------------------------------------------+ double MM()
Hello, I have tried to download an EA demo but once I hit the button to download it nothing happens, I'm logged into the MQL5 Community. I don't know why it's not showing up. Any help is appreciated
I would like to draw vertical lines for times when a new signal appears in an EA. Signals can be of several natures and are returned by an independent function, but for simplicity lets say a signal is simply the Price close crossover an EMA. Using a command like: ObjectCreate ( 0 , "Long"
Can anyone please help me code for my EA to only trade between 7am and 11am /1PM and 4PM GMT. please could you explain the code so I can learn. much appreciated
Hello, I have purchased EA form mql5 market but cannot download it from VPS. I have successfully log in my mql5 account on VPS. But I can't download it, it always show "failed download [404]" How can I fix it
I have an EA i have developed who need certain conditions to open a position than he maintain that position. Now i want to have an additional trade open on diffrent conditions, and that it will manage it without touching the other. now to each one it will avg if a certain loss is reached, and will
I pull my candles in this way: lines = mt5. copy_rates_from_pos (chart, mt5.TIMEFRAME_M5, 0, 25) It should return the last 25 candles. Sometimes it does, sometimes it doesn't. Success output: [2023.09.19 05:01:00] [***]chart=EURUSD+ lenlines=25 [2023.09.19 05:01:00] x=0 linestamp=300
hi guys, i made an expert advisor using an indicator, every time a buy signal is detected the ea sends a message to a telegram channel i made, and is the same for sell signals. the problem is that it does not send the message, i know its not the web requests because it sends a message successfully
hello Anyone have the code for this? i know it's simple but my mind is somehow blocked. let's say i have an array contains few double elements, I know one of these elements and need to get the closest hi and closest low to this element. I don't want to use sorting and indexing, thank you
Hello i have an array inside the indicator , how can i use it in another EA? i can think that it needs to be copied to buffer and access it using icustom ? if thats the case how can i copy the array to the buffer ? i cant seem to find anything about it or maybe i am missing it . or maybe there is
Can any body convert this pine script code to mql5: // This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/ // © forkh //@version=5 strategy( "Momentum Strategy" , overlay= true ) length = input ( 12 ) price = close momentum(seria, length) =>
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
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