거래 로봇을 무료로 다운로드 하는 법을 시청해보세요
당사를 Facebook에서 찾아주십시오!
당사 팬 페이지에 가입하십시오
스크립트가 흥미로우신가요?
그렇다면 링크 to it -
하셔서 다른 이들이 평가할 수 있도록 해보세요
스크립트가 마음에 드시나요? MetaTrader 5 터미널에서 시도해보십시오
조회수:
5597
평가:
(41)
게시됨:
2017.11.03 12:22
업데이트됨:
2018.08.30 12:57
\MQL5\Scripts\ \MQL5\Include\
Symbol.mqh (5.32 KB) 조회
이 코드를 기반으로 한 로봇이나 지표가 필요하신가요? 프리랜스로 주문하세요 프리랜스로 이동

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에서 러시아어로 번역함.
원본 코드: 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.