Hi,
I came across a strange behavior of timer which I cannot comprehend.
When I run the following simple EA:
int period = 1800; // 0.5 hourint OnInit(){ bool r = EventSetTimer(period); Print("Set Timer to ", period, " seconds. Result: ", r); return(0);}void...
Hi, I don't know how to use trailing stop correctly or at least in the most optimized way. Let's talk theoretically. The symbol price is 1.200, I have both SL and TP at 10pips. Pseudo code of my trailing stop code goes something along these lines: int start() { if condition has been met BUY
Hi,
In MT4, we could apply a trading strategy with multiple level of price for Take profit and Stop loss, by using multiple orders for the same currency, like:
order #1, buy EURUSD, price=1.3000, SL=1.2980, TP=1.3050
order #2, buy EURUSD, price=1.3010, SL=1.2990, TP=1.3060
After migrating to...
Hello! I have a problem with ea. I want to translate this code to mq5.
int beschleunigen = IndicatorCounted(); if (beschleunigen < 0) return (-1); if (beschleunigen > 0) beschleunigen--; int korper = Bars - beschleunigen; for (int finalint = 0; finalint < korper; finalint++)
Regards!
Hi all
I've three EA implemented. All these EA's have to read a "real" global variable to set some parameters. With "real" global variable I mean one value which is accessible (readable) from every running EA (e.g. my three EA's).
I've implemented this with a file. The file have the value and ever...
"the sell order request could not be completed"
i have already read the other threads regarding this issue, and i am already using zeromemory before the order
the ea was working fine last weekend, now i get this error ....
also, if i run it through the strategy tester it works fine, no errors....
Do any wizards out there know if it is possible to manually reposition stops and targets of an EA once it is in trade?
My strategy trades support and resistance on the D1 using the zigzag as previous high/low. I’m currently defining the trade criteria and manually back-testing it, in preparation to...
I found a discrepancy between the championship's official website and the platform metatrader 5, that a position on the platform was closed and instead the remote site already has nearly 24 hours is still open. Why is that?
To keep it short and simple,
can anybody tell me what is wrong with this code and how to fix it?
I want to store the past 100 Rates for various symbols in a 2-Dimensional Array structure.
It keeps telling me "wrong dimension" at line 3
MqlRates barWindow[][100];ArrayResize(barWindow,...
Hi all,
I want to connect with a friend of mine via metatester. I want to share my CPU with him, so he can test with my computer also. We have tried lots of things, but we can't connect. Should we use our real IP? Someone tried to do this before us?
By the way, I can connect my LAN computers...
Hi guys,
I've been using this tutorial as a template for my EAs because it's easy to read and add indicators and conditions to it: https://www.mql5.com/en/articles/100
But unfortunately, I couldn't add a trailing stop functionality to this code. I've tried to copy some code from other tutorials...
Hello, have a Problem with StringFormat. The function SOMETIMES writes "(null)" to resulting string and there is no reason why this happens. Find below the code for a complete script demonstrating this: string get_string(void){ string xtag="AAAAAAAAAA"; return xtag;}void test(const...
Hi ALL,
I busy writing a semi adaptive EA with the bolingar band. The idea is I need to at certain stage increase the deviation. So my first attempt was to just create another indicator with increased deviation and add it to the chart.... The problem is when you loop throught the indicators on the...
I need to know how much it costs approx. Optimizing an Expert Advisor to the MQL5 Cloud Network, to have enough credit on my account, thanks in advance
Hello, there is a problem with CChartObjectLabel::Description function. Please look at the sample below. It should print 0 to console as Description is empty. CChartObjectLabel x_label; x_label.Create(0,"name",0,100,100); x_label.Description(""); string x=x_label...
I've been thinking for several days an idea for which I can't find an answer. I was wondering how could I develop an EA in a different way than before. I will explain my idea with one example I know the past prices of EURUSD of the last, say, 3 years. I want to develop a strategy that, knowing this
do someone have an EA that send an alert when a new operation came out onto MT5? i'm looking at some EA during the champioship and an audio / email alert would be helpful.
D.
Hello,
My question is how to access information to the under formation bar.
I found some information on MQL4 but nothing in MQL5.
Thanks in advance.
Juan
Hello,
i have a custom DLL returning ANSI string. How to delcare this function in .mqh file please ?
const char& myfunc() - error
const char[] myfunc() - error
const char* myfunc() - error
char& myfunc() - error
char[] myfunc() - error
char* myfunc() - error
how to do this...
Hi, I started learning mql4 two weeks ago, along the way I noticed mql5 programming is growing.
1. From your perspective : Do i rather stop learning mql4 and switch to mql5 stright away? Or, learn programming in mql4(many helpful articles=learning faster) than just learn how to convert bot to mql5...
Hi,
is it possible to set indicator color from EA?
Indicator is added to the the chart from EA by the ChartIndicatorAdd(0,0,indicatorHandle) method.
Thanks for help
Peter
Hello, I was wondering if anybody knew of a way to optimize a strategy across several instruments in MT5. I know you can set the optimiser to Market Watch but it won't iterate through all the parameters to give you the best results across different instruments . Cheers
[Deleted]
Hello,
I have a question : whatever the timeline I would like to know the OHLC price of a bar (1 min OHLC).
i.e: I have set a 5 min timeframe for eurusd, between each bars i would like to "print" into the console, each minutes, the OHLC price of the current currency.
Wich way to explore ?...
[Deleted]
Hello, I work actually on an EA and I would like to check for some conditions each new minutes I saw on a previous topic this script : static datetime Old_Time; datetime New_Time[6]; bool IsNewBar=false; if(Old_Time!=New_Time[0]) // if old time isn't equal to new bar time...
I have 2 EA, they are work together for 1 pair, such as EURUSD, How can I run backtest? hongbin.fei
Hello,
I would like to send order entry and exit signals from an external software application I am developing in C# .NET.
Could anyone help me understand how I can accomplish this?
Thanks!!!
Hi all I've a global variable defined like this: MqlRates ga_rates[]; Then I've a function in my EA defined as follows. void getBarInfo(){ // fill array with bar information to use in functions CopyRates(Symbol(), PERIOD_CURRENT, 0,10, ga_rates);} Now I would like to use the variable ga_rates...
Hi all
I'm a very "new newbie" in MQL5 (I've experiences in other progr. lang. but not in MQL5). I trade for more than two years and now is time to start with developing EA to make trading (hopefully) easyier and less risky.
To my challange...
I need the OPEN information of the last and...
Hello, people.
Strategy tester does not read past indicator data. Is it right?? Is it a bug?? What am I doing wrong?
I'm writing an EA that needs to read past indicator data. It works just fine in Debugging mode, but it doesn't work when used in Strategy Test.
To illustrate, a prepared a simple...
Hi, dear traders
I'm looking for EA with three TF (M15, H1 and H4) and candles
for its indicator. EA can open buy or sell at M15 by watching candles
at H1 and H4 when candles show go up or go down.
Does anyone have an EA with this idea?
Thank you.
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.