Fan sayfamıza katılın
Öyleyse bir link gönderin -
başkalarının da faydalanmasını sağlayın
- Görüntülemeler:
- 10753
- Derecelendirme:
- Yayınlandı:
- 2018.01.22 10:01
-
Bu koda dayalı bir robota veya göstergeye mi ihtiyacınız var? Freelance üzerinden sipariş edin Freelance'e git
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 in Market Watch
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. 4. A tick chart of the synthetic instrument FOREX.GBP.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. 7. Strength of EUR, USD, GBP, JPY, CHF
MetaQuotes Ltd tarafından Rusçadan çevrilmiştir.
Orijinal kod: https://www.mql5.com/ru/code/19544
![x1](https://c.mql5.com/i/code/expert.png)
Simultaneous opening of opposing positions. Lot management
![VR---ZVER](https://c.mql5.com/i/code/expert.png)
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](https://c.mql5.com/i/code/expert.png)
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](https://c.mql5.com/i/code/expert.png)
The Expert Advisor uses the signals of "crossover of two iMAs (Moving Average, MA)". The EA uses Trailing Stop and Take Profit.