Download MetaTrader 5

Watch how to download trading robots for free

Interesting script?
So post a link to it -
let others appraise it

You liked the script? Try it in the MetaTrader 5 terminal

Experts

FOREX Currency Powers - expert for MetaTrader 5

| English Русский 中文 Español Deutsch Português

Views:
554
Rating:
votes: 13
Published:
2018.01.22 10:01
\MQL5\Include\

Description:

MetaTrader 5 allows creating synthetic instruments. The price of such instruments can depend on the current values of a number of financial instruments.

An example of such instruments in the stock market is the stock market index. Indexes for the FOREX market are USDX, EURX.

In trading, such symbols allow spotting the beginning and end of global market movements at an early stage.

We can create a currency strength indicator by averaging the current position of the Close price relative to the High/Low range over a certain amount of one-minute bars (in this case 5) of corresponding currency pairs.

The strength of Forex currencies in this example is calculated using the following formulas:

<FOREX.EUR> = (EURUSD+EURGBP+EURCHF+EURJPY)/4
<
FOREX.USD> = (USDCHF+USDEUR+USDGBP+USDJPY)/4
<
FOREX.GBP> = (GBPUSD+GBPEUR+GBPCHF+GBPJPY)/4
<
FOREX.JPY> = (JPYUSD+JPYEUR+JPYGBP+JPYCHF)/4
<
FOREX.CHF> = (CHFUSD+CHFGBP+CHFJPY+CHFEUR)/4

In this example, the strengths of currencies are plotted in the interval from 0 to 100, the central line passes through the level 50. The sum of the strengths of currencies at any moment of time is equal to 50, i.е. the currencies move at the expense of other currencies. Global movements of USD are reflected on stock and commodity markets, as well as the Forex market (because all markets are interrelated).

Copy the CurrencyPowerIndex.mqh file to <terminal_data_folder>\MQL5\Include.

After you launch FOREX_Currency_Power.mq5, the following synthetic instruments will appear in the Market Watch window: FOREX.EUR.M5, FOREX.USD.M5, FOREX.GBP.M5, FOREX.JPY.M5, FOREX.CHF.M5:

Fig.1. Synthetic instruments FOREX.EUR.M5, FOREX.USD.M5, FOREX.GBP.M5, FOREX.JPY.M5, FOREX.CHF.M5

Fig.1. Synthetic instruments FOREX.EUR.M5, FOREX.USD.M5, FOREX.GBP.M5, FOREX.JPY.M5, FOREX.CHF.M5 in Market Watch


Fig. 2. A tick chart of the synthetic instrument FOREX.EUR.M5

Fig. 2. A tick chart of the synthetic instrument FOREX.EUR.M5


Fig. 3. A tick chart of the synthetic instrument FOREX.USD.M5

Fig. 3. A tick chart of the synthetic instrument FOREX.USD.M5


Fig. 4. A tick chart of the synthetic instrument FOREX.GBP.M5

Fig. 4. A tick chart of the synthetic instrument FOREX.GBP.M5


Fig. 5. A tick chart of the synthetic instrument FOREX.JPY.M5

Fig. 5. A tick chart of the synthetic instrument FOREX.JPY.M5


Fig. 6. A tick chart of the synthetic instrument FOREX.CHF.M5

Fig. 6. A tick chart of the synthetic instrument FOREX.CHF.M5


Fig. 7. Strength of EUR, USD, GBP, JPY, CHF

Fig. 7. Strength of EUR, USD, GBP, JPY, CHF

Translated from Russian by MetaQuotes Software Corp.
Original code: https://www.mql5.com/ru/code/19544

x1 x1

Simultaneous opening of opposing positions. Lot management

VR---ZVER VR---ZVER

The EA uses three iMAs (Moving Average, MA), one iStochastic (Stochastic Oscillator) and one iRSI (RSI, Relative Strength Index). Positions are opened by market, as well as Buy Stop and Sell Stop pending orders are placed.

FORTS Currency Powers FORTS Currency Powers

An example of creating synthetic instruments for calculating the strength of RTS, USD, RUB based on futures contracts of the FORTS market.

EMA 6.12 EMA 6.12

The Expert Advisor uses the signals of "crossover of two iMAs (Moving Average, MA)". The EA uses Trailing Stop and Take Profit.