LEARN MQL5 TUTORIAL BASICS - 53 SIMPLE FIBONACCI OBJECT
https://mql5tutorial.com
Introduction to Creating a Fibonacci Object (00:00 – 00:12)
Introduction to creating a Fibonacci object in MQL5 as requested by a course member.
Starting in MetaEditor and Creating a New Expert Advisor File (00:12 – 00:24)
Instructions on opening MetaEditor and creating a new expert advisor file named "Simple Fibonacci Object."
Setting Up the Code Structure (00:24 – 00:34)
Deleting unnecessary code above the 'on tick' function.
Creating Variables for Highest and Lowest Candles (00:34 – 00:47)
Creating integer variables for the number of the highest and lowest candles.
Creating Arrays for Highest and Lowest Prices (00:47 – 01:10)
Creating and sorting arrays for the highest and lowest prices of candles.
Filling Arrays with High and Low Values (01:10 – 01:48)
Using 'CopyHigh' and 'CopyLow' to fill arrays with the highest and lowest values for one hundred candles.
Calculating the Highest and Lowest Candles (01:48 – 02:05)
Using 'ArrayMaximum' and 'ArrayMinimum' to calculate the highest and lowest candles.
Creating a Price Information Array (02:05 – 02:17)
Creating and sorting a price information array for the chart.
Copying Price Data and Deleting Old Fibonacci Objects (02:17 – 02:50)
Copying price data for the chart and using 'ObjectDelete' to remove old Fibonacci objects.
Creating the Fibonacci Object on the Chart (02:50 – 03:45)
Using 'ObjectCreate' to draw the Fibonacci object on the chart, specifying its properties and borders.
Compilation and Testing in MetaTrader (03:45 – 04:21)
Compiling the code and instructions on testing the expert advisor in MetaTrader using the strategy tester.
Demonstration of the Fibonacci Object on the Chart (04:21 – 04:30)
Demonstrating the Fibonacci object drawn on the chart during a test.
Calculating and Displaying Fibonacci Values (04:30 – 06:27)
Using 'ObjectGetInteger' and 'ObjectGetDouble' to calculate and display time and price levels of the Fibonacci object on the chart.
In this video we are going to create such a Fibonacci object, this was a request from one of our course members, so let's find out how to do that with mql5.
To start please click on a little icon here or press F4 on your keyboard, now you should see the Metaeditor window and here you want to click on file, new file, expert advisor from template, continue, I will call this file simple Fibonacci object, click on continue, continue and finish.
Now you can delete everything above the on tick function and the two comment lines here.
Inside of the on tick function we want to create a few variables for the highest and the lowest candle, these are integer variables because it's only the number of the highest and lowest candle.
We also create two arrays for the highest and the lowest prices and with array set as series we are going to sort the arrays from the current candle downwards, let's also do that with the second array and now we can fill the arrays, we are using copy high to fill the high array with the highest prices of those candles, I would like to calculate the values based on one hundred candles.
And for the lowest values in the candles, we use copy low, both for the current symbol on the chart and the currently selected period, we start with candle zero, that's the current candle and copy the values for one hundred candles in each of the arrays.
Now we can use array maximum to calculate the value for the highest candle in our high array and we use array minimum to calculate the lowest candle in our low array but we also need some price values, so let's use mql rates to create a price information array, this one also needs to be sorted with array set as series.
Now we copy all the price data for the whole chart by using copy rates for the current symbol on the chart and the currently selected period for all the bars on the chart into our price information array, we use object delete to remove formal Fibonacci objects, we don't have any objects at the very first time but afterwards, we delete the old object before we draw a new one and now we use object.create to actually create the Fibonacci object on our chart.
For the current symbol on the chart, the name will be Fibonacci, the type of the object is obj underscore fibo, if you mark it and press F1 you will see that we have lots of different object types, this is the one that we are going to use, we want to use the main window to draw the object, the left border will be candle number one hundred, the right border is candle zero, the upper border is where the highest candle price is and the lower border will be drawn on the lowest low of these one hundred candles.
That’s about it.
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «LEARN MQL5 TUTORIAL BASICS - 53 SIMPLE FIBONACCI OBJECT», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.