![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
@Alain Verleyen is it possible to add this to the list of bugs for the Dev team to look into please? Steps and sample code to reproduce it in my messages above.
Thanks
Asked on Russian forum.
Asked on Russian forum.
@Alain Verleyen Thank you. Please let me know once you hear from the Dev team. Thanks
Late reply, but because .Net Framework 4.8 is supported, so are .Net Standard 2.0 libraries.
Admittedly you're missing out on the newer C# language features, and a lot of CLR enhancements, but you can achieve anything you need to with .Net Standard 2.0, and most NuGet packages provide a version which will target this.
Dear all,
In other words:I think I have found a bug in MQL5, but would first like to confirm it by the moderators. I am not sure if I am posting the bug on the correct place, if not sorry, please move it.
It's about the iTEMA indicator, here's the excerpt of the code:
The iTEMA indicator / buffer mixes the candle positions - instead of [1] which should the last candle like in iMA, [2] is the last candle within iTEMA. On the other hand, [2] is the last candle in iTEMA, but it should be the penultimate candle.
Thanks in advance for your feedback.
Dear all,
In other words:I think I have found a bug in MQL5, but would first like to confirm it by the moderators. I am not sure if I am posting the bug on the correct place, if not sorry, please move it.
It's about the iTEMA indicator, here's the excerpt of the code:
The iTEMA indicator / buffer mixes the candle positions - instead of [1] which should the last candle like in iMA, [2] is the last candle within iTEMA. On the other hand, [2] is the last candle in iTEMA, but it should be the penultimate candle.
Thanks in advance for your feedback.
Please prove your claims with log output showing the values and a chart screenshot showing them on the chart.
99.9% chance it's not a bug but your error or misunderstanding.
Dear Alain,
sorry for my late feedback.
Enclosed you can find the MA and TEMA values on a specific example:
And here the cross:
Note that the signal was defined as follows:
According to this function and for this specific example, that would be a sell signal. However, in MQL5 it's a buy signal. And that's what I think is a bug.
Thanks in advance for your feedback.
Your image is pretty unclear. Please either print as log or as comment all relevant prices of the signal being triggered and show them.
Or learn to use the debugger:
Code debugging: https://www.metatrader5.com/en/metaeditor/help/development/debug
Error Handling and Logging in MQL5: https://www.mql5.com/en/articles/2041
Tracing, Debugging and Structural Analysis of Source Code, scroll down to: "Launching and Debuggin": https://www.mql5.com/en/articles/272
Hi Carl,
![Log-File Log-File](https://c.mql5.com/3/415/Log_Cross_TEMA_MA__1.png)
ok sorry, below you can find the log of this specific example:
As you can see, this would have been a sell signal, but a market buy position is opened. And of course, I am opening a buy position when there is a long signal and vice versa.
Hi Carl,
ok sorry, below you can find the log of this specific example:
As you can see, this would have been a sell signal, but a market buy position is opened. And of course, I am opening a buy position when there is a long signal and vice versa.
So it's a clearly a bug...in your code.
Show all the relevant code.
it's not a bug in my code. Please see the code above (https://www.mql5.com/en/forum/388557/page2#comment_47956842) - everything is described there.
If signal_Long = true, a market buy position is opened.
If signal_Short = true, a market sell position is opened.
Thanks!