거래 로봇을 무료로 다운로드 하는 법을 시청해보세요
당사를 Facebook에서 찾아주십시오!
당사 팬 페이지에 가입하십시오
스크립트가 흥미로우신가요?
그렇다면 링크 to it -
하셔서 다른 이들이 평가할 수 있도록 해보세요
스크립트가 마음에 드시나요? MetaTrader 5 터미널에서 시도해보십시오
라이브러리

UniMagicNumber - MetaTrader 5용 라이브러리

조회수:
1846
평가:
(13)
게시됨:
2018.10.25 15:37
\MQL5\Libraries\
이 코드를 기반으로 한 로봇이나 지표가 필요하신가요? 프리랜스로 주문하세요 프리랜스로 이동

The library allows receiving a magic number bound to three elements:

  • Symbol (financial instrument) name;
  • Timeframe;
  • Prefix index;

All these three elements are to be encoded in 64 bits, of which:

  • Symbol name = 48 bits (the first 8 characters are taken from the name);
  • Timeframe = 5 bits;
  • Prefix index = 11 bits (may be a number from 0 to 2047, inclusive).

The prefix number is necessary for obtaining several unique magic numbers on a single chart. To do this, we need to call the appropriate function with different prefix indices. The number of prefix indices is limited and may vary from 0 to 2047, inclusive.

To obtain the magic number, just call the function:

ulong GetMagicNumber(ushort prefix,//prefix number
                     string symbol,//Symbol name
                     ENUM_TIMEFRAMES tf);//Timeframe


Example of use:

//+------------------------------------------------------------------+
//| Input params
//+------------------------------------------------------------------+
input ushort MagicPrefixNumber_ = 0;

//+------------------------------------------------------------------+
//| Import functions
//+------------------------------------------------------------------+
#import "cUniMagicNumber.ex5"
   ulong GetMagicNumber(ushort prefix,//prefix number
                        string symbol,//Symbol name
                        ENUM_TIMEFRAMES tf);//Timeframe
#import

//+------------------------------------------------------------------+
//| Global Vars
//+------------------------------------------------------------------+
ulong _MagicNumber;

//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int OnInit()
{
   _MagicNumber = GetMagicNumber(MagicPrefixNumber_, Symbol(), Period());

   return (INIT_SUCCEEDED);
}


MetaQuotes Ltd에서 러시아어로 번역함.
원본 코드: https://www.mql5.com/ru/code/22069

Money-Meter Money-Meter

The indicator measures money on a chart.

Exp_XDeMarker_Histogram_Vol Exp_XDeMarker_Histogram_Vol

The trading system based on XDeMarker_Histogram_Vol indicator signals

XDeMarker_Histogram_Vol_Direct XDeMarker_Histogram_Vol_Direct

XDeMarker_Histogram_Vol indicator shows direction of the histogram bars movement using colored icons on these bars

ASCV ASCV

The Expert Advisor based on BrainTrend1Sig indicator