Artwork

เนื้อหาจัดทำโดย MQL4 TUTORIAL เนื้อหาพอดแคสต์ทั้งหมด รวมถึงตอน กราฟิก และคำอธิบายพอดแคสต์ได้รับการอัปโหลดและจัดเตรียมโดย MQL4 TUTORIAL หรือพันธมิตรแพลตฟอร์มพอดแคสต์โดยตรง หากคุณเชื่อว่ามีบุคคลอื่นใช้งานที่มีลิขสิทธิ์ของคุณโดยไม่ได้รับอนุญาต คุณสามารถปฏิบัติตามขั้นตอนที่อธิบายไว้ที่นี่ https://th.player.fm/legal
Player FM - แอป Podcast
ออฟไลน์ด้วยแอป Player FM !

MQL4 TUTORIAL BASICS – 109 SIMPLE FRACTALS EXPERT ADVISOR

6:07
 
แบ่งปัน
 

ซีรีส์ที่ถูกเก็บถาวร ("ฟีดที่ไม่ได้ใช้งาน" status)

When? This feed was archived on December 18, 2021 00:33 (2+ y ago). Last successful fetch was on October 24, 2021 04:05 (2+ y ago)

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 294304235 series 1615247
เนื้อหาจัดทำโดย MQL4 TUTORIAL เนื้อหาพอดแคสต์ทั้งหมด รวมถึงตอน กราฟิก และคำอธิบายพอดแคสต์ได้รับการอัปโหลดและจัดเตรียมโดย MQL4 TUTORIAL หรือพันธมิตรแพลตฟอร์มพอดแคสต์โดยตรง หากคุณเชื่อว่ามีบุคคลอื่นใช้งานที่มีลิขสิทธิ์ของคุณโดยไม่ได้รับอนุญาต คุณสามารถปฏิบัติตามขั้นตอนที่อธิบายไว้ที่นี่ https://th.player.fm/legal

[This post contains video, click to play]

In this video, we are going to create an expert advisor for this indicator here.

It’s the fractals indicator and the expert advisor is going to open, buy and sell trades based on this value.

So let’s find out how to calculate that with MQL4.

To do that, please click on a little button 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 fractals EA click on, continue, continue, and finish.

Now you can remove everything above the on tick function and the two comment lines here, we start by creating a string variable for the signal, but we don’t assign any values here.

Now let’s actually calculate the values for the fractal indicator, and that is done by using I fractals.

We need to pass a few parameters. The first one is for the current symbol on the chart.

The second one is for the currently selected period on that chart.

The third one is MODE_UPPER. If you mark that and press F1, you will see that MODE_UPPER represents a value of one.

It is used for the upper line of some indicators, and one of them is ifractals.

And we are going to calculate the value for candle two, because Ifractals is not creating the arrows for the current candle.

It creates them for candles in the past.

So if you would use candle zero here, you would get no values.

Let’s repeat that, this time we are going to calculate the lower fractals value.

This is pretty much similar, but this time we are using MODE_LOWER. And this also is the value for candle two.

That’s the third candle because the current candle is candle zero. Now we can check the signal conditions.

And if the lower fractals value is not zero, we want to check if the lower fractals value is below the lower price of candle one.

And if that is the case, we consider that to be a buy signal.

And now we assign the word buy to our signal.

In the other case, when it is going down, we want to check if the upper fractals value is not zero.

And the second condition is that we want to know if the upper fractals value is greater than the high price for candle one, that would be a sell signal.

And that’s when we assign the word sell to our signal.

Now we can check if our signal equals buy. And we also want to know if the return value for orders total equals zero.

That would mean we have a buy signal and no open positions.

And that’s when we use order send to open a buy position for 10 micro lot.

In the other case, if our signal equals sell and we also have no open positions, we use order send to sell 10 micro lot and to see what’s going on, we add a comment statement that will show us the upper value, the lower value and the current signal on our chart.

And that’s about it.

Well, 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 of the basic video series, or maybe even the premium course on our website might be interesting for you. That’s actually where you also can find a link for courses that contain all the source codes here.

For now, please click on the compile button or press F7 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 meta trader.

And in meta trader, please pick an empty chart, click on insert indicators, Bill Williams, fractals, click on okay, here is the indicator.

And now we can right click into the chart, select template, save template, and we save it as Tester.tpl, because this is the template that we are going to see in the strategy tester.

You can override the current one, and now you can click on view, strategy tester or press control and R, please pick the new file Simple fractals EA.ex4, mark the option for the visual mode here and start your test.

Here we are, the expert advisor is running.

I’m going to speed it up a little bit. And here is our first buy trade.

You can see that we have values for the indicator.

So our little expert advisor is working as expected.

And in this little video, you have learned how to create an expert advisor for the fractals indicator, 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

The post MQL4 TUTORIAL BASICS – 109 SIMPLE FRACTALS EXPERT ADVISOR appeared first on MQL4TUTORIAL.COM.

  continue reading

32 ตอน

Artwork
iconแบ่งปัน
 

ซีรีส์ที่ถูกเก็บถาวร ("ฟีดที่ไม่ได้ใช้งาน" status)

When? This feed was archived on December 18, 2021 00:33 (2+ y ago). Last successful fetch was on October 24, 2021 04:05 (2+ y ago)

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 294304235 series 1615247
เนื้อหาจัดทำโดย MQL4 TUTORIAL เนื้อหาพอดแคสต์ทั้งหมด รวมถึงตอน กราฟิก และคำอธิบายพอดแคสต์ได้รับการอัปโหลดและจัดเตรียมโดย MQL4 TUTORIAL หรือพันธมิตรแพลตฟอร์มพอดแคสต์โดยตรง หากคุณเชื่อว่ามีบุคคลอื่นใช้งานที่มีลิขสิทธิ์ของคุณโดยไม่ได้รับอนุญาต คุณสามารถปฏิบัติตามขั้นตอนที่อธิบายไว้ที่นี่ https://th.player.fm/legal

[This post contains video, click to play]

In this video, we are going to create an expert advisor for this indicator here.

It’s the fractals indicator and the expert advisor is going to open, buy and sell trades based on this value.

So let’s find out how to calculate that with MQL4.

To do that, please click on a little button 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 fractals EA click on, continue, continue, and finish.

Now you can remove everything above the on tick function and the two comment lines here, we start by creating a string variable for the signal, but we don’t assign any values here.

Now let’s actually calculate the values for the fractal indicator, and that is done by using I fractals.

We need to pass a few parameters. The first one is for the current symbol on the chart.

The second one is for the currently selected period on that chart.

The third one is MODE_UPPER. If you mark that and press F1, you will see that MODE_UPPER represents a value of one.

It is used for the upper line of some indicators, and one of them is ifractals.

And we are going to calculate the value for candle two, because Ifractals is not creating the arrows for the current candle.

It creates them for candles in the past.

So if you would use candle zero here, you would get no values.

Let’s repeat that, this time we are going to calculate the lower fractals value.

This is pretty much similar, but this time we are using MODE_LOWER. And this also is the value for candle two.

That’s the third candle because the current candle is candle zero. Now we can check the signal conditions.

And if the lower fractals value is not zero, we want to check if the lower fractals value is below the lower price of candle one.

And if that is the case, we consider that to be a buy signal.

And now we assign the word buy to our signal.

In the other case, when it is going down, we want to check if the upper fractals value is not zero.

And the second condition is that we want to know if the upper fractals value is greater than the high price for candle one, that would be a sell signal.

And that’s when we assign the word sell to our signal.

Now we can check if our signal equals buy. And we also want to know if the return value for orders total equals zero.

That would mean we have a buy signal and no open positions.

And that’s when we use order send to open a buy position for 10 micro lot.

In the other case, if our signal equals sell and we also have no open positions, we use order send to sell 10 micro lot and to see what’s going on, we add a comment statement that will show us the upper value, the lower value and the current signal on our chart.

And that’s about it.

Well, 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 of the basic video series, or maybe even the premium course on our website might be interesting for you. That’s actually where you also can find a link for courses that contain all the source codes here.

For now, please click on the compile button or press F7 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 meta trader.

And in meta trader, please pick an empty chart, click on insert indicators, Bill Williams, fractals, click on okay, here is the indicator.

And now we can right click into the chart, select template, save template, and we save it as Tester.tpl, because this is the template that we are going to see in the strategy tester.

You can override the current one, and now you can click on view, strategy tester or press control and R, please pick the new file Simple fractals EA.ex4, mark the option for the visual mode here and start your test.

Here we are, the expert advisor is running.

I’m going to speed it up a little bit. And here is our first buy trade.

You can see that we have values for the indicator.

So our little expert advisor is working as expected.

And in this little video, you have learned how to create an expert advisor for the fractals indicator, 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

The post MQL4 TUTORIAL BASICS – 109 SIMPLE FRACTALS EXPERT ADVISOR appeared first on MQL4TUTORIAL.COM.

  continue reading

32 ตอน

ทุกตอน

×
 
Loading …

ขอต้อนรับสู่ Player FM!

Player FM กำลังหาเว็บ

 

คู่มืออ้างอิงด่วน