Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1318
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
Please tell me which class to inherit your class from in order to use all the methods of these
to use all the methods of these classes inside of your class, without creating objects inside of your class?
Inheritance means creating a class.
Hi all!
I have an indicator - written in mql5 which I would like to use to create an EA.
When I create an EA, I can't find the buffers I need, it feels like I don't have them at all.
I have to do it this way:
No matter how I change or add an iCustom line - I keep getting the same thing in the log:
2021.06.26 17:59:42.251 Proba (EURUSD,M15) 1.00000
And the comment: 1.00000 and 1.00000 again.
Help me understand - is it suitable for creating an EA, or do I need to refine it, or maybe I'm doing something wrong?In MT5 it is used differently. Take a look at the example in the help.
iCustom
Returns the handle of the specified custom indicator.
https://www.mql5.com/ru/docs/indicators/icustom
In MT5 it is used differently. Take a look at the example in the help.
iCustom
Returns the handle of the specified custom indicator.
https://www.mql5.com/ru/docs/indicators/icustom
I am just starting to program and ask you to be lenient with me.
I'm beginning to suspect that this requires an additional function
Please explain.... where .... and how....?
Hi all!
I have an indicator - written in mql5 which I would like to use to create an EA.
When I create an EA, I can't find the buffers I need, it feels like I don't have them at all.
I have to do it this way:
No matter how I change or add an iCustom line - I keep getting the same thing in the log:
2021.06.26 17:59:42.251 Proba (EURUSD,M15) 1.00000
And the comment: 1.00000 and 1.00000 again.
Help me understand - is it suitable for creating an EA, or do I need to refine it, or maybe I'm doing something wrong?Code:
Result:
Hi all!
I have an indicator - written in mql5 - that I would like to use to create an EA.
Here I made it - it seems to work! (where yellow is for buffers)
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
I also need a stop loss(I couldn't figure out why it closed immediately).
I'm beginning to suspect that this requires an extra function
That's right. You connect the indicator in OnInit, set parameters there and get its handle. And then use the CopyBuffer.
https://www.mql5.com/ru/docs/series/copybuffer
I made this - it seems to be working! (where yellow is the buffers)
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
Turns out I need a stop loss - (couldn't figure out why it closed immediately) added a stop loss
Thanks a lot !!!
You did a good job, but I'm interested in a completely different algorithm for the EA. I would like to use a simple Martingale (sieve) with these customizable parameters :
, but add to it the indicator I put in - above. And use it as a trigger (false - work only in SHORT and true - work only in LONG).
I chose this indicator - only because it works like MovingAverages, but it has some smoothing filters and price direction change points, which can be used as a trigger for the EA to work only on trend using profit settings from the menu.
And as soon as the take profit is closed, we open the next order in the same direction (in the trend), until the trend is over and our trigger is switched over. If an order does appear out of trend (at the moment when the trend changes from one state to another), we should use Martins with settings from the menu for it.
If you want to help write such an EA, I would be very grateful.
Now for the subject:
I am self-taught and i am not able to explain it, i have just selected the functions i need.
I basically copy the codes from Vladimir Karputov, thank him very much! - If you have any questions he will tell you.
I understand you need an indicator to filter !
You need to run your Expert Advisor through this filter