Popular Posts

Editor'S Choice - 2019

MQL5: How to Write an Indicator for MetaTrader 5

Dear friends Forex traders, programmers, hello!

Today's lesson is about developing an indicator. We will learn how to write an indicator for the Metatrader 5 terminal in MQL5, respectively. It will be an oscillator displaying the difference of two moving averages in the form of a color histogram.

The indicator has four adjustable parameters:

MaFastPeriod - The period of fast MA;
MaSlowPeriod - The period of slow MA;
Maethethod - The method applied to the price;
Maappliedprice - Actually - the type of price.

The calculation formula is defined as:
MAOS = MaFast - MaSlow

Let's write our indicator for the MetaTrader 5 terminal.

Homework

  1. Instead of displaying the Moving Average reading difference, display a histogram based on the RSI indicator.
  2. In lessons 6 and 7, we wrote advisers. Continue? Write an advisor working on this indicator. Let it be a scalper night lamp, i.e. one of the parameters of which will be the operating time.

Previous MQL5 Lessons:


Watch the video: MQL5 TUTORIAL - SIMPLE ARROW INDICATOR (December 2019).

Leave Your Comment