당사 팬 페이지에 가입하십시오
UniMagicNumber - MetaTrader 5용 라이브러리
- 조회수:
- 2012
- 평가:
- 게시됨:
- 2018.10.25 15:37
- 이 코드를 기반으로 한 로봇이나 지표가 필요하신가요? 프리랜스로 주문하세요 프리랜스로 이동
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
The indicator measures money on a chart.
Exp_XDeMarker_Histogram_VolThe trading system based on XDeMarker_Histogram_Vol indicator signals
XDeMarker_Histogram_Vol indicator shows direction of the histogram bars movement using colored icons on these bars
ASCVThe Expert Advisor based on BrainTrend1Sig indicator