Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1302

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Vladimir Karputov, and me?)
I can't say for sure, but try 0.0
Added: It seems that you cannot cancel 'INDICATOR_MINIMUM' and 'INDICATOR_MAXIMUM' with MQL5.
I can't say for sure, but try 0.0
Added: It seems that 'INDICATOR_MINIMUM' and 'INDICATOR_MAXIMUM' cannot be cancelled by MQL5.
Alas...
Thank you for your reply.
(same problem with levels, actually; but solved by setting the number of levels)
Alas...
Thanks for the reply.
(The problem with levels is actually the same; but solved by setting the number of levels)
Experiment and everything will work out.
I compared the properties that the chart saves (using'Stochastic Oscillator' indicator as an example)
This is clearly a 'bool' type property, but there is no access to this property from MQL5 language.
I compared the properties that the chart saves (using'Stochastic Oscillator' indicator as an example)
It is clearly a 'bool' type property but there is no access to this property from MQL5.
Yes, alas.
Thanks again)
There is a problem. Using the function (see below), we can obtain TakeProfit and StopLoss values by position ID from the history (i.e. when the position is already closed), this function works in real time, but in the strategy tester, it cannot find TakeProfit and StopLoss, because it does not see historical orders that set stops (importantly, the stops are set after the position opening)
Question: How can I use the Strategy Tester to find out the TP/Loss for a closed position based on a ticket?
I'm just trying to program EAs, and I want to start by writing a statistical spread collector.
I mean, what would I like it to do? In the tester, an EA starts and collects data on tick history for a certain period of time, e.g. ten days.
And then it generates the following data in csv or xlsx file:
Average spread for a period of time: 00:00 - 09:00 on the server, 09:00 - 18:00, 18:00 - 00:00 (for all ten days), maximum spread for this time, minimum spread and average spread of currency pair for the entire period of ten days.
I am really tired of collecting it by hand.
I know that there are programs, which kind of do it themselves... But I want my own, as a workout.
Maybe respected connoisseurs can tell me where to start? And is it even possible to write such a program?
Thanks in advance to all who replied and were sympathetic to a newcomer.
Hi all. Maybe someone has a ready piece of code. There are 2 parameters, deposit=3000 and lot 0.01 i.e. with deposit 3000 lot will be 0.01, now strictly at doubling i.e. when depo will be 6000 lot will be 0.02 at 9000 will be 0.03 how to do it?
Hi all. Maybe someone has a ready piece of code. There are 2 parameters, deposit=3000 and lot 0.01 i.e. with deposit 3000 lot will be 0.01, now strictly at doubling i.e. when depo will be 6000 lot will be 0.02 at 9000 will be 0.03 how to do it?
It is roughly like this:
Result:
Good time,
Please help me to find a bug... I copy bar values (BarsCount) from the indicator buffer in the script, then I loop around values, detect a signal and print them to Print(); it seems to be simple, but it's not so easy... I get all signals as I wanted except for crossing zero line.
CROSSOVER_OR_REVERSE
Maybe the script shouldn't do it that way? I attached the code and a screenshot of the log... Thanks a lot!