Artwork

תוכן מסופק על ידי MQL4 TUTORIAL. כל תוכן הפודקאסטים כולל פרקים, גרפיקה ותיאורי פודקאסטים מועלים ומסופקים ישירות על ידי MQL4 TUTORIAL או שותף פלטפורמת הפודקאסט שלהם. אם אתה מאמין שמישהו משתמש ביצירה שלך המוגנת בזכויות יוצרים ללא רשותך, אתה יכול לעקוב אחר התהליך המתואר כאן https://he.player.fm/legal.
Player FM - אפליקציית פודקאסט
התחל במצב לא מקוון עם האפליקציה Player FM !

MQL4 TUTORIAL BASICS – 105 SIMPLE SELL GRID SYSTEM

4:52
 
שתפו
 

סדרה בארכיון ("עדכון לא פעיל" status)

When? This feed was archived on December 18, 2021 00:33 (4y ago). Last successful fetch was on October 24, 2021 04:05 (4y 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 292159408 series 1615247
תוכן מסופק על ידי MQL4 TUTORIAL. כל תוכן הפודקאסטים כולל פרקים, גרפיקה ותיאורי פודקאסטים מועלים ומסופקים ישירות על ידי MQL4 TUTORIAL או שותף פלטפורמת הפודקאסט שלהם. אם אתה מאמין שמישהו משתמש ביצירה שלך המוגנת בזכויות יוצרים ללא רשותך, אתה יכול לעקוב אחר התהליך המתואר כאן https://he.player.fm/legal.

[This post contains video, click to play]

In this video, we are going to create a sell grid system that will open sell trades when we have a falling trend. 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 here you want to click on file, new file, Expert Advisor from template, continue. I will call this file Simple Sell Grid System. Click on continue, continue and finish.

Now you can delete everything above the Ontick function and the two comment lines here. First, we need a string variable for the signal, that will also be called signal and we do not assign a value here because we are going to calculate that later. Inside of the ontick function we create a static double variable called Next sell price. We are going to use that for the next price level and if we have no open positions, that would be the case when OrdersTotal returns the value of zero, we want to set the next sell price level to zero. To find out if we have a sell signal we are going to use a function that is called check entry signal. This function does not exist so far, so we need to code it in a few minutes. For our sell position we want to check a few conditions. First, we want to check if the Bid price is below the next sell price level that we have defined or if the next sell price is zero, the next condition we want to check is if the signal has been a sell signal.

If both conditions are true, we are going to use ordersend for the current symbol on the chart to open a sell trade for 10 Microlot. And right afterwards we are going to set the next sell price level to a value 30 points below the Bid price. Let’s add a comment statement to output the Bid price and the next sell price on our chart so we see what’s going on. So far this is it with the Ontick function. But remember, the function for the entry signal still needs to be created.

Our function will have the name check entry signal and it will return a string value to calculate the current signal. We are going to use something very easy. We want to check if the close price for candle one is bigger than the open price for candle one. If that is the case, we consider that to be a buy signal. So now we assign the work buy to our signal. In the other case, if the close price for candle one is below the open price for candle one that would be a sell signal. And in that case we would assign the word sell to our signal.

Finally, we use the return statement to return the signal to our main module, 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 or maybe even the Premium Course on our website might be interesting for you. That’s where you actually can also find a link for source codes like in this video. But for now, please click on the Compile button or press F7 on your keyboard.

I don’t have any errors here. 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 tester or press Control and R, please pick the new file simple sell grid system, dot EX4 and the Visual mode here and start your test. Here we are. This is our first position. I will increase the speed a little bit and now you’ll see that we have a second position and a third one.

So our little Expert Advisor works as expected. And in this little video you have learned how to create a sell grid system for Metatrader4 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 – 105 SIMPLE SELL GRID SYSTEM appeared first on MQL4TUTORIAL.COM.

  continue reading

32 פרקים

Artwork
iconשתפו
 

סדרה בארכיון ("עדכון לא פעיל" status)

When? This feed was archived on December 18, 2021 00:33 (4y ago). Last successful fetch was on October 24, 2021 04:05 (4y 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 292159408 series 1615247
תוכן מסופק על ידי MQL4 TUTORIAL. כל תוכן הפודקאסטים כולל פרקים, גרפיקה ותיאורי פודקאסטים מועלים ומסופקים ישירות על ידי MQL4 TUTORIAL או שותף פלטפורמת הפודקאסט שלהם. אם אתה מאמין שמישהו משתמש ביצירה שלך המוגנת בזכויות יוצרים ללא רשותך, אתה יכול לעקוב אחר התהליך המתואר כאן https://he.player.fm/legal.

[This post contains video, click to play]

In this video, we are going to create a sell grid system that will open sell trades when we have a falling trend. 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 here you want to click on file, new file, Expert Advisor from template, continue. I will call this file Simple Sell Grid System. Click on continue, continue and finish.

Now you can delete everything above the Ontick function and the two comment lines here. First, we need a string variable for the signal, that will also be called signal and we do not assign a value here because we are going to calculate that later. Inside of the ontick function we create a static double variable called Next sell price. We are going to use that for the next price level and if we have no open positions, that would be the case when OrdersTotal returns the value of zero, we want to set the next sell price level to zero. To find out if we have a sell signal we are going to use a function that is called check entry signal. This function does not exist so far, so we need to code it in a few minutes. For our sell position we want to check a few conditions. First, we want to check if the Bid price is below the next sell price level that we have defined or if the next sell price is zero, the next condition we want to check is if the signal has been a sell signal.

If both conditions are true, we are going to use ordersend for the current symbol on the chart to open a sell trade for 10 Microlot. And right afterwards we are going to set the next sell price level to a value 30 points below the Bid price. Let’s add a comment statement to output the Bid price and the next sell price on our chart so we see what’s going on. So far this is it with the Ontick function. But remember, the function for the entry signal still needs to be created.

Our function will have the name check entry signal and it will return a string value to calculate the current signal. We are going to use something very easy. We want to check if the close price for candle one is bigger than the open price for candle one. If that is the case, we consider that to be a buy signal. So now we assign the work buy to our signal. In the other case, if the close price for candle one is below the open price for candle one that would be a sell signal. And in that case we would assign the word sell to our signal.

Finally, we use the return statement to return the signal to our main module, 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 or maybe even the Premium Course on our website might be interesting for you. That’s where you actually can also find a link for source codes like in this video. But for now, please click on the Compile button or press F7 on your keyboard.

I don’t have any errors here. 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 tester or press Control and R, please pick the new file simple sell grid system, dot EX4 and the Visual mode here and start your test. Here we are. This is our first position. I will increase the speed a little bit and now you’ll see that we have a second position and a third one.

So our little Expert Advisor works as expected. And in this little video you have learned how to create a sell grid system for Metatrader4 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 – 105 SIMPLE SELL GRID SYSTEM appeared first on MQL4TUTORIAL.COM.

  continue reading

32 פרקים

Minden epizód

×
 
Loading …

ברוכים הבאים אל Player FM!

Player FM סורק את האינטרנט עבור פודקאסטים באיכות גבוהה בשבילכם כדי שתהנו מהם כרגע. זה יישום הפודקאסט הטוב ביותר והוא עובד על אנדרואיד, iPhone ואינטרנט. הירשמו לסנכרון מנויים במכשירים שונים.

 

מדריך עזר מהיר

האזן לתוכנית הזו בזמן שאתה חוקר
הפעלה