התחל במצב לא מקוון עם האפליקציה Player FM !
MQL4 TUTORIAL BASICS – 95 SIMPLE LOW GANN FAN
סדרה בארכיון ("עדכון לא פעיל" status)
When? This feed was archived on December 18, 2021 00:33 (). Last successful fetch was on October 24, 2021 04:05 ()
Why? עדכון לא פעיל status. השרתים שלנו לא הצליחו לאחזר פודקאסט חוקי לזמן ממושך.
What now? You might be able to find a more up-to-date version using the search function. This series will no longer be checked for updates. If you believe this to be in error, please check if the publisher's feed link below is valid and contact support to request the feed be restored or if you have any other concerns about this.
Manage episode 284823545 series 1615247
[This post contains video, click to play]
In this video, we are going to create this kind of object. This is a LowGannFan object from the lowest candle to the current candle. So let’s find out how to do that with MQL4. To get started please click on a little icon here or press F4 on your keyboard.
Now you should see the Metaeditor window and you want to click on file. New file Expert Advisor from Template, continue. I will call this file simple LowGannFan, click on Continue, continue and finish. Now you can delete everything above the Ontick function and the two comment lines here. First, we want to calculate the number for the first visible bar. And that can be done by using this function. It is called Window First Visible Bar, that will return the index of the first visible bar.
So that’s not the value. That’s just the number.
Now we can calculate the number for the lowest candle on the chart. And that can be done by using the function ilowest, because that will give us the lowest value over a specific number of bars, depending on time, for the current symbol on the chart and the currently selected period on that chart. We use ModeUnerscoreLow because we are interested in the lowest prices of the candles, and that is for all the candles on the chart up to the current candle zero, before we create a new object, we use object delete, that will delete all the objects called simple LowGannFan.
Because we want to avoid that we draw several objects at the same time, the very first time we call this function, we will not have such an object. But afterwards, we want to make sure that we remove the old object before we draw a new one. Once that is done, we use object create to create a new object. And this will need a few parameters. So let’s go through the parameter values one by one. The first parameter is for the chart ID, that’s chart ID zero in our case.
The second is the object name. In our case it is called simple LowGannFan. You can call it whatever you like as long as you use the same name everywhere. Parameter three is for the object type. We are using OBJ_GannFan. If you mark that and press F1, you will see that there are other object types, depending on the type of the object, you would need to use other parameters. We are going to create this kind of object, and in the next parameter we are going to tell Metatrader that we want to draw it in the main window, that’s window zero, the one with the candles, the object should be drawn from the point in time where the lowest candle appears on the chart.
This is always the time scale and here are the values. The next parameter is for the lowest price of the lowest candle. So these two values here define the starting point. The object should be drawn to the point in time where the current candle is drawn and the last parameter is for the low of the current candle. And that’s it for this object creation. Of course, you could change the parameters here, but for this simple example, this is good enough.
Now let’s continue and change a few values, that can be done by using ObjectSetInteger for the current chart ID zero. We want to change a property for the object that is called simple LowGannFan. The property I want to change is called object property underscore color and I would like to see a red color. Let’s change another property. The first part is the same. But I would like to change object property, Ray, and set it to true, that will give us a kind of object prediction because that will draw the object to the current candleand into the future.
So far, so good. If this was too fast for you or if you have no idea what all the code here does, maybe you want to watch one of the other videos in the basic video series or maybe even the Premium Course on our website might be interesting for you. For now, please click on the compile button or press F seven on your keyboard. You shouldn’t get any errors. And if that is the case, you can click on a little button here or press F4 to go back to Metatrader.
And in Metatrader you want to click on View Strategy Test to or press Control and R, please pick the new object. Simple LowGannFan dot EX4 mark the option for the visual mode here and start your test. Here we are. The object is drawn and we see that it is also adjusted. Let’s zoom into the chart. We see that the Expert Advisor is working as expected. And in this little video you have learned how to draw a LowGannFan object right on your chart and you have coded it yourself with a few lines of MQL4 code.

Not sure what to do? Click on the automated trading assistant below

- MQL4 TUTORIAL BASICS - 67 SIMPLE VERTICAL LINE In this video we are going to create an expert…
- MQL4 TUTORIAL BASICS - 89 SIMPLE HIGH PRICE TREND LINE In this video we are going to create an…
- MQL4 TUTORIAL BASICS - 94 SIMPLE SPREADSHEET FILE WRITER In this video we are going to create an…
- MQL4 TUTORIAL BASICS - 11 HOW TO CALCULATE A SIMPLE… In this video we are going to calculate the values…
- MQL4 TUTORIAL BASICS - 86 SIMPLE BUY BUTTON OBJECT In this video we are going to create a simple…
- MQL4 TUTORIAL BASICS - 108 SIMPLE IOBVEA OSCILLATOR In this video, we are going to create an…
- MQL4 TUTORIAL BASICS - 87 SIMPLE SELL BUTTON OBJECT In this video we are going to create a button…
- MQL4 TUTORIAL BASICS - 114 SIMPLE SHIFTED PRICE EA In this video, we are going to create an Expert…
- MQL4 TUTORIAL BASICS - 80 SIMPLE SPREAD CHECKER In this video, we will create an expert advisor that…
- MQL4 TUTORIAL BASICS - 106 SIMPLE ICHIMOKU KINKO HYO In this video, we are going to create an…

The post MQL4 TUTORIAL BASICS – 95 SIMPLE LOW GANN FAN appeared first on MQL4TUTORIAL.COM.
32 פרקים
סדרה בארכיון ("עדכון לא פעיל" status)
When? This feed was archived on December 18, 2021 00:33 (). Last successful fetch was on October 24, 2021 04:05 ()
Why? עדכון לא פעיל status. השרתים שלנו לא הצליחו לאחזר פודקאסט חוקי לזמן ממושך.
What now? You might be able to find a more up-to-date version using the search function. This series will no longer be checked for updates. If you believe this to be in error, please check if the publisher's feed link below is valid and contact support to request the feed be restored or if you have any other concerns about this.
Manage episode 284823545 series 1615247
[This post contains video, click to play]
In this video, we are going to create this kind of object. This is a LowGannFan object from the lowest candle to the current candle. So let’s find out how to do that with MQL4. To get started please click on a little icon here or press F4 on your keyboard.
Now you should see the Metaeditor window and you want to click on file. New file Expert Advisor from Template, continue. I will call this file simple LowGannFan, click on Continue, continue and finish. Now you can delete everything above the Ontick function and the two comment lines here. First, we want to calculate the number for the first visible bar. And that can be done by using this function. It is called Window First Visible Bar, that will return the index of the first visible bar.
So that’s not the value. That’s just the number.
Now we can calculate the number for the lowest candle on the chart. And that can be done by using the function ilowest, because that will give us the lowest value over a specific number of bars, depending on time, for the current symbol on the chart and the currently selected period on that chart. We use ModeUnerscoreLow because we are interested in the lowest prices of the candles, and that is for all the candles on the chart up to the current candle zero, before we create a new object, we use object delete, that will delete all the objects called simple LowGannFan.
Because we want to avoid that we draw several objects at the same time, the very first time we call this function, we will not have such an object. But afterwards, we want to make sure that we remove the old object before we draw a new one. Once that is done, we use object create to create a new object. And this will need a few parameters. So let’s go through the parameter values one by one. The first parameter is for the chart ID, that’s chart ID zero in our case.
The second is the object name. In our case it is called simple LowGannFan. You can call it whatever you like as long as you use the same name everywhere. Parameter three is for the object type. We are using OBJ_GannFan. If you mark that and press F1, you will see that there are other object types, depending on the type of the object, you would need to use other parameters. We are going to create this kind of object, and in the next parameter we are going to tell Metatrader that we want to draw it in the main window, that’s window zero, the one with the candles, the object should be drawn from the point in time where the lowest candle appears on the chart.
This is always the time scale and here are the values. The next parameter is for the lowest price of the lowest candle. So these two values here define the starting point. The object should be drawn to the point in time where the current candle is drawn and the last parameter is for the low of the current candle. And that’s it for this object creation. Of course, you could change the parameters here, but for this simple example, this is good enough.
Now let’s continue and change a few values, that can be done by using ObjectSetInteger for the current chart ID zero. We want to change a property for the object that is called simple LowGannFan. The property I want to change is called object property underscore color and I would like to see a red color. Let’s change another property. The first part is the same. But I would like to change object property, Ray, and set it to true, that will give us a kind of object prediction because that will draw the object to the current candleand into the future.
So far, so good. If this was too fast for you or if you have no idea what all the code here does, maybe you want to watch one of the other videos in the basic video series or maybe even the Premium Course on our website might be interesting for you. For now, please click on the compile button or press F seven on your keyboard. You shouldn’t get any errors. And if that is the case, you can click on a little button here or press F4 to go back to Metatrader.
And in Metatrader you want to click on View Strategy Test to or press Control and R, please pick the new object. Simple LowGannFan dot EX4 mark the option for the visual mode here and start your test. Here we are. The object is drawn and we see that it is also adjusted. Let’s zoom into the chart. We see that the Expert Advisor is working as expected. And in this little video you have learned how to draw a LowGannFan object right on your chart and you have coded it yourself with a few lines of MQL4 code.

Not sure what to do? Click on the automated trading assistant below

- MQL4 TUTORIAL BASICS - 67 SIMPLE VERTICAL LINE In this video we are going to create an expert…
- MQL4 TUTORIAL BASICS - 89 SIMPLE HIGH PRICE TREND LINE In this video we are going to create an…
- MQL4 TUTORIAL BASICS - 94 SIMPLE SPREADSHEET FILE WRITER In this video we are going to create an…
- MQL4 TUTORIAL BASICS - 11 HOW TO CALCULATE A SIMPLE… In this video we are going to calculate the values…
- MQL4 TUTORIAL BASICS - 86 SIMPLE BUY BUTTON OBJECT In this video we are going to create a simple…
- MQL4 TUTORIAL BASICS - 108 SIMPLE IOBVEA OSCILLATOR In this video, we are going to create an…
- MQL4 TUTORIAL BASICS - 87 SIMPLE SELL BUTTON OBJECT In this video we are going to create a button…
- MQL4 TUTORIAL BASICS - 114 SIMPLE SHIFTED PRICE EA In this video, we are going to create an Expert…
- MQL4 TUTORIAL BASICS - 80 SIMPLE SPREAD CHECKER In this video, we will create an expert advisor that…
- MQL4 TUTORIAL BASICS - 106 SIMPLE ICHIMOKU KINKO HYO In this video, we are going to create an…

The post MQL4 TUTORIAL BASICS – 95 SIMPLE LOW GANN FAN appeared first on MQL4TUTORIAL.COM.
32 פרקים
כל הפרקים
×ברוכים הבאים אל Player FM!
Player FM סורק את האינטרנט עבור פודקאסטים באיכות גבוהה בשבילכם כדי שתהנו מהם כרגע. זה יישום הפודקאסט הטוב ביותר והוא עובד על אנדרואיד, iPhone ואינטרנט. הירשמו לסנכרון מנויים במכשירים שונים.