Ticaret robotlarını ücretsiz olarak nasıl indirebileceğinizi izleyin
Bizi Twitter üzerinde bulun!
Fan sayfamıza katılın
Komut dosyasını ilginç mi buldunuz?
Öyleyse bir link gönderin -
başkalarının da faydalanmasını sağlayın
Komut dosyasını beğendiniz mi? MetaTrader 5 terminalinde deneyin
Kütüphaneler

Symbol - MetaTrader 5 için kütüphane

Görüntülemeler:
5759
Derecelendirme:
(41)
Yayınlandı:
2017.11.03 12:22
Güncellendi:
2018.08.30 12:57
\MQL5\Scripts\ \MQL5\Include\
Bu koda dayalı bir robota veya göstergeye mi ihtiyacınız var? Freelance üzerinden sipariş edin Freelance'e git

The library contains functionality that allows you to understand the basics of work with custom symbols, and offers some ready-made solutions that can be useful.


Example

When you run backtest on cross pairs, the tester uses the main symbol and an additional one allowing to convert the profit currency of the main symbol to the account currency. Access to the additional symbol, generation of its ticks, and synchronization with the main symbol take too much precious computing resources and time during a single test run and especially during optimization. However, this accuracy is almost always unnecessary. Therefore, I wanted to bypass this obtrusiveness/flaw of the MetaTrader 5 tester. It can be easily done in MetaTrader 4, because it provides the possibility to change the account currency directly in the tester. MetaTrader 5 does not provide this option.

The demo script shows an attempt to bypass this restriction of the tester, i.e. to remove unnecessary calculations. For this purpose, it creates a copy of the symbol for backtesting, and the sets profit currency equal to the account currency. Therefore conversion of testing results is not required. In this case, profit is actually calculated in pips, which can be very demonstrative in some situations.

// Creating a copy of the symbol and changing the profit currency
#property script_show_inputs

#include <Symbol.mqh>

sinput string PostFix = "_custom";

void OnStart()
{
  const SYMBOL Symb(_Symbol + PostFix); // Creating the symbol

  Symb = _Symbol; // Copying all properties and the bar history of the main symbol

  Symb.SetProperty(SYMBOL_CURRENCY_PROFIT, AccountInfoString(ACCOUNT_CURRENCY)); // Making the base currency equal to the deposit currency

  Symb.On(); // Enabling the symbol in Market Watch

  ChartOpen(Symb.Name, PERIOD_CURRENT); // Opening the chart of the new symbol
}

MetaQuotes Ltd tarafından Rusçadan çevrilmiştir.
Orijinal kod: https://www.mql5.com/ru/code/18855

ATRValues ATRValues

The indicator shows a text block with the values ​​of the user defined ATR period for each timeframe.

KoliErBands KoliErBands

Another version of Bollinger Bands using as the middle line the average of the High and Low over a selected period.

Last ZZ50 Last ZZ50

The strategy is based on the ZigZag indicator and pending orders.

Four_MA_Strength_HTF Four_MA_Strength_HTF

The Four_MA_Strength indicator with the timeframe selection option available in input parameters.