How to draw candle type indicator in seperate(sub) windows like in chart window?
I have 2 questions for you:
Question 1:
I've attached an image below where the results do not appear to make sense. For example see highlighted bars A (no sell signal where there should be one), B (sell signal when there shouldn't be one) & C (no buy signal when there should be one). I'm trying to find out why there is such a difference, but can't understand it.
The only way that I could see this happening is that in the "RandonIndicatorSignal" does not use the same values of randomness then the one being displayed in the window. (ie. it would mean that on this chart there are actually 2 seperate instances of the "RandomIndicator" created by MT4, one for display purposes on the chart and another instance for the actual Signal variation.) Is this actually true?
Question 2:
Also, I've noticed your sentence:
if(counted_bars>0) counted_bars--;Can you please explain what are these situations where the last tick in a previous bar remains unprocessed? It would appear that because of this, we have to calculate the current bar and the previous bar. Which means that on occasions the value for the previous bar could change depending on this "last tick" and that could change the outcome for our custom indicator.
PS. Minor suggestion, since this a multi-part series of articles, it would handy to have links of the previous articles embedded in this article.
How to draw candle type indicator in seperate(sub) windows like in chart window?
im a newbi but i dont understan this article... so hard .. what dose mQL4 do..??????????
You can create custom indicators in less than a minute with a custom indicator builder. It's a graphical environment
to create Custom Indicators. No coding is required. No need to know/learn
how to program in MQL.
Read more about it here: http://www.molanis.com/products/molanis-technical-indicator-builder/custom-indicator-design
You can download it here: http://www.molanis.com/products/molanis-technical-indicator-builder/forex-technical-indicator-builder-download
Features and Benefits
- Create Custom Indicators without writing any code.
- Fast development time. Test your trading ideas in minutes.
- No programming skills or MQL knowledge are required.
- Leading Edge Code Generation creates all the code for MetaTrader.
- Keep your trading and indicator ideas to yourself. No need to share your knowledge with programmers.
- Gives you access to Molanis Online Community, Molanis Forum and free custom indicators for MT4.
- Free trial!
If you are interested in automating trading of your custom indicators, you can do it very simply at http://www.eacreator.com/
All parameters and modes will be read automatically from your custom indicator mql4 file and you will see them on web site. Creating EA with custom indicators takes just several minutes and you will have automated system with important features like money/risk management, various trailing stops, dynamic SL/TP, martingale, strategy reversal and many others.
Indicators are much more difficult to write than EA's I can write an EA to do anything I want it to do, but I have never managed to write an indicator that actually worked other than by modifying an existing one.
Indicators are much more difficult to write than EA's I can write an EA to do anything I want it to do, but I have never managed to write an indicator that actually worked other than by modifying an existing one.
Further to that comment, This tutorial helped me learn how to create my own indicators, I would recommend everyone learning mql4 read this tutorial
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
New article MQL4 Language for Newbies. Custom Indicators (Part 1) has been published:
This is the fourth article from the series "MQL4 Languages for Newbies". Today we will learn to write custom indicators. We will get acquainted with the classification of indicator features, will see how these features influence the indicator, will learn about new functions and optimization, and, finally, we will write our own indicators. Moreover, at the end of the article you will find advice on the programming style. If this is the first article "for newbies" that you are reading, perhaps it would be better for you to read the previous ones. Besides, make sure that you have understood properly the previous material, because the given article does not explain the basics.
Types of Indicators
Now I will show you, what kinds of indicators exist. Of course, you have seen a lot of them, but now I would like to draw your attention to features and parameters of indicators, thus we will make a small classification of features and parameters. It will then help you to write custom indicators. So, the first simple indicator:
This is Moving Average, MA, a widely used technical indicator. Pay attention to the following important facts:
Author: Antoniuk Oleg