Популярное

Музыка Кино и Анимация Автомобили Животные Спорт Путешествия Игры Юмор

Интересные видео

2025 Сериалы Трейлеры Новости Как сделать Видеоуроки Diy своими руками

Топ запросов

смотреть а4 schoolboy runaway турецкий сериал смотреть мультфильмы эдисон
dTub
Скачать

MQL4 TUTORIAL BASICS - 18 HOW TO TRADE SMALL ACCOUNTS WITHOUT BEING STOPPED OUT

Автор: MQL4Tutorial

Загружено: 2019-05-18

Просмотров: 5050

Описание:

https://mql4tutorial.com/?s=account

With Metatrader4 and MQL4 we can automatically trade different account types. This video is about a way how to trade even small accounts with real money - without being stopped out...

In this video we will create this simple Expert Advisor that is actually going to trade. It crates buy or sell signals based on the Simple Moving Average that you see here.

When you hover the red line you will see that’s Moving average for 20 candles, so let's find out how to create such a simple system.

To do that first please click on the 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/ Expert Advisor (template)” from template, “Continue”, I will call this file: “SimpleMovingAverageEA”, click on “Continue”, “Continue” and “Finish”.

Let’s remove everything that is above the “OnTick” function and delete the two command lines here.

We start by creating a string variable for the signal that will be called: “signal” and it doesn't contain any value so far because we are going to assign that later on.

Now we want to calculate the Moving Average for 20 candles.

MQL4 comes with a function that is called: “iMA”, we pass a few parameters here;

The first one will get the current symbol on the chart,

The second one will find out what the time period on that chart is,

The third parameter here is for the number of candles that we are going to use.

This value here and the last one are shift values; the first one could be used to move the drawing of the red line here to the right or to the left,

The last one here is used to tell Metatrader for which candle we want the value because all those candles here have an on value for the Simple Moving Average and all the values are connected to draw the line.

This parameter here (MODE_SMA) is to define that we want to use the Simple Moving Average or SMA and it should be calculated based on the close price (PRICE_CLOSE).

And if the Moving Average is below the current price we want to assign the value: “buy” to our signal. Otherwise if the Moving Average is above the current price we want to assign the value: “sell” to our signal.

Now we need to check if the signal equals buy and the other condition we want to check if is “OrdersTotal” equals 0 (zero) so we have no open order.

You see this operator here (&&)?

It is used to check if both conditions are true, so only if the left condition is true and the right condition is true we use “OrderSend” to buy 10 micro lot.

Otherwise if the signal equals sell and if “OrdersTotal” is 0 (zero) we use “OrderSend” to sell 10 micro lot.

If you have problems understanding this line please go back to the former basic videos. For this simple version we will just need to add one more thing, we use the “Comment” line to output the sentence: “The current signal is:” followed by the signal.

That’s about it. Let’s click on the “Compile” button, we don’t have any errors so now we can go back to Metatrader.

Now if we start our Expert Advisor we don’t see the Simple Moving Average here, to change that we use a little trick; we just click on: “Insert/ Indicators/ Trend/ Moving Average”, here we pick the 20 candles, the shift value is 0 (zero), we want the Simple Moving Average and that should be calculated based on the close price, so lets click on “OK”.

Here is our Indicator, now we right click into the chart, select: “Templates/ Save Template” and we save it as: “tester.tpl” because this is the template that is going to be used in our Strategy Test.

So let’s click on: “View/ Strategy Tester” or press CTRL and R, pick the new file: “SimpleMovingAverageEA.ex4”, mark the visual mode here and start a test.

And here we are! This is the Simple Moving Average that we have calculated, we get buy or sell signals directly on our chart, this is our first sell position here so the little EA is actually trading and in this little video you have learned how to create a working Expert Advisor that actually trades buy and sell signals for a Simple Moving Average and you have coded it yourself with a few lines of MQL4 code.

MQL4 TUTORIAL BASICS - 18 HOW TO TRADE SMALL ACCOUNTS WITHOUT BEING STOPPED OUT

Поделиться в:

Доступные форматы для скачивания:

Скачать видео mp4

  • Информация по загрузке:

Скачать аудио mp3

Похожие видео

MQL4 TUTORIAL BASICS - 110 SIMPLE MULTIPLE INPUT

MQL4 TUTORIAL BASICS - 110 SIMPLE MULTIPLE INPUT

The ONLY Candlestick Pattern Guide You'll EVER NEED

The ONLY Candlestick Pattern Guide You'll EVER NEED

💥 Trading en VIVO | Sesión de Londres – Estrategia CRT ⚡ Oro, EUR/USD, GBP/USD y más | Trade Elite

💥 Trading en VIVO | Sesión de Londres – Estrategia CRT ⚡ Oro, EUR/USD, GBP/USD y más | Trade Elite

Учебное пособие по торговле скользящими средними (для дневной торговли)

Учебное пособие по торговле скользящими средними (для дневной торговли)

Они унизили уборщика — и поплатились за это | Розыгрыш в спортзале от Анатолия № 57

Они унизили уборщика — и поплатились за это | Розыгрыш в спортзале от Анатолия № 57

ОСНОВЫ MQL4 - 37 КАК ИМПОРТИРОВАТЬ ВНЕШНИЙ ИСХОДНЫЙ КОД

ОСНОВЫ MQL4 - 37 КАК ИМПОРТИРОВАТЬ ВНЕШНИЙ ИСХОДНЫЙ КОД

System Design Concepts Course and Interview Prep

System Design Concepts Course and Interview Prep

У вас много амбиций, но вам лень? Посмотрите это видео...

У вас много амбиций, но вам лень? Посмотрите это видео...

How To Start Day Trading As A Beginner In 2026 (FULL GUIDE)

How To Start Day Trading As A Beginner In 2026 (FULL GUIDE)

Совет старика.

Совет старика.

Trading Psychology | Why Normal Doesn’t Make Money | Part 1

Trading Psychology | Why Normal Doesn’t Make Money | Part 1

Это снова повторяется, и никто об этом не говорит.

Это снова повторяется, и никто об этом не говорит.

How I Made $1,000,000 in 51 Days of Day Trading (Full Training)

How I Made $1,000,000 in 51 Days of Day Trading (Full Training)

Crazy Summer Fails 2025 🌊| Brutal Try Not to Laugh

Crazy Summer Fails 2025 🌊| Brutal Try Not to Laugh

Но что такое нейронная сеть? | Глава 1. Глубокое обучение

Но что такое нейронная сеть? | Глава 1. Глубокое обучение

25 Запрещенных Гаджетов, Которые Вы Можете Купить Онлайн

25 Запрещенных Гаджетов, Которые Вы Можете Купить Онлайн

Три лучшие стратегии торговли опционами для небольших счетов

Три лучшие стратегии торговли опционами для небольших счетов

MQL4 TUTORIAL BASICS - 62 SIMPLE MARGIN MONITOR

MQL4 TUTORIAL BASICS - 62 SIMPLE MARGIN MONITOR

Задача из вступительных Стэнфорда

Задача из вступительных Стэнфорда

Fundamentals of Finance & Economics for Businesses – Crash Course

Fundamentals of Finance & Economics for Businesses – Crash Course

© 2025 dtub. Все права защищены.



  • Контакты
  • О нас
  • Политика конфиденциальности



Контакты для правообладателей: infodtube@gmail.com