Questions from Beginners MQL5 MT5 MetaTrader 5 - page 677
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
I will explain ... I collect the functions that I need about 5-6 that I couldn't find on the web and then I order an EA (as if I invent it) so that these functions could be present there and finally I get the functions that I need - all at once ... And now I just do not have time to fill up my wallet on Mcl .
No, well, order from someone you'll be ordering this function from anyway. There's no problem...
Oh how.... Threats are coming...
God forbid. No threats. I'm just appealing for humanity. ....
And you are being urged to do this:
Use your brain, write the code. Show me what you got or didn't get. No one will laugh here.
Ask a question about your code. We will tell you what is wrong.
I'm tired of explaining it to you in private.
how to find the price at which the crossover occurred? That is, I need to open a deal not at the moment of MA crossing, but, say, 10 points after the crossing.
The function if you can show please
MQL5 Wizard - Trading signals by crossing two exponential moving averages. And a little modification.
Thanks a lot))) This is what I have already written .
The Expert Advisor works on signals from two iMAs: iMA(5) and iMA(4) on M5 timeframe.
Don't be like that if it's far from the truth. It's unnecessary.
Learning to program is about getting into it, not rejecting it.
Here's more
The Expert Advisor works using signals from two iMAs: iMA(5) and iMA(4) at timeframe M5.
At the beginning we need to set these 10 points/pips - we won't argue about perception. Let's name the variable InpDistanse=10 and immediately the internal variable ExtDistanse. Let's perform tuning in OnInit - for 3 or 5 digits
//--- tuning for 3 or 5 digits
int digits_adjust=1;
if(m_symbol.Digits()==3 || m_symbol.Digits()==5)
digits_adjust=10;
ExtDistanse = InpDistanse*digits_adjust*m_symbol.Point();
It remains to introduce a static variable into OnTick(), in which we should record the crossing price. Then we simply calculate the difference between the current price and the crossover price and compare the difference with the ExtDistanse.