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

CFileSet - MetaTrader 5용 라이브러리

Extends of CFile class to work with .set file in Application Parameter
게시자:
[삭제]
조회수:
1699
평가:
(17)
게시됨:
2021.05.29 09:50
업데이트됨:
2021.06.10 08:51
이 코드를 기반으로 한 로봇이나 지표가 필요하신가요? 프리랜스로 주문하세요 프리랜스로 이동

CClock - Extend of CFile class to work with the .set 


Installation

  • Put FileSet.mqh into your Include\Files folder
  • Put Test.set into your Files\ folder
  • Put FileSet Test.mqh into your Scripts folder
  • Use one of the samples that shows the usage

    Inputs

    • FileName : the filename of the .set file

    Methods

      //--- methods for working with files
       int               Open(const string file_name,const int open_flags);
       //--- methods of access to protected data
       int               Count(void);
       bool              ContainsKey(string key);
       //--- methods to access data
       template<typename TValue>
       bool              TryGetValue(const string key, TValue &value);
       bool              TryGetValue(const string key, string &value);
    

    Usage

    #include <Files\FileSet.mqh>
    
    CFileSet FileSet;
    //+------------------------------------------------------------------+
    //| Script program start function                                    |
    //+------------------------------------------------------------------+
    void OnStart()
      {
    //---
       FileSet.Open("Test.set",FILE_READ|FILE_SHARE_READ);
       char test_char;
       if(FileSet.TryGetValue("InpTestChar",test_char))
          Print(test_char);
       short test_short;
       if(FileSet.TryGetValue("InpTestShort",test_short))
          Print(test_short);
       int test_int;
       if(FileSet.TryGetValue("InpTestInteger",test_int))
          Print(test_int);
       long test_long;
       if(FileSet.TryGetValue("InpTestLong",test_long))
          Print(test_long);
       float test_float;
       if(FileSet.TryGetValue("InpTestFloat",test_float))
          Print(test_float);
       double test_double;
       if(FileSet.TryGetValue("InpTestDouble",test_double))
          Print(test_double);
       string test_string;
       if(FileSet.TryGetValue("InpTestString",test_string))
          Print(test_string);
       bool test_bool;
       if(FileSet.TryGetValue("InpTestBool",test_bool))
          Print(test_bool);
       datetime test_datetime;
       if(FileSet.TryGetValue("InpTestDatetime",test_datetime))
          Print(TimeToString(test_datetime,TIME_DATE|TIME_SECONDS));
       color test_color;
       if(FileSet.TryGetValue("InpTestColor",test_color))
          Print(ColorToString(test_color,true));
       ENUM_TEST test_enum;
       if(FileSet.TryGetValue("InpTestEnum",test_enum))
          Print(EnumToString(test_enum));
       FileSet.Close();
      }
    //+------------------------------------------------------------------+
    
    It should show the below result with the sample file (Test.set)
    
    2021.05.31 05:09:27.546 FileSet Test (EURUSD,H1)        97
    2021.05.31 05:09:27.548 FileSet Test (EURUSD,H1)        32767
    2021.05.31 05:09:27.548 FileSet Test (EURUSD,H1)        2147483647
    2021.05.31 05:09:27.548 FileSet Test (EURUSD,H1)        9223372036854775807
    2021.05.31 05:09:27.548 FileSet Test (EURUSD,H1)        1.00001
    2021.05.31 05:09:27.548 FileSet Test (EURUSD,H1)        2.225073858507201e-308
    2021.05.31 05:09:27.548 FileSet Test (EURUSD,H1)        This is InpTestString
    2021.05.31 05:09:27.548 FileSet Test (EURUSD,H1)        false
    2021.05.31 05:09:27.548 FileSet Test (EURUSD,H1)        2000.01.01 00:00:00
    2021.05.31 05:09:27.548 FileSet Test (EURUSD,H1)        clrBlack
    2021.05.31 05:09:27.548 FileSet Test (EURUSD,H1)        TEST3


    Volume Calculator Based on Risk To Reward Volume Calculator Based on Risk To Reward

    This EA can Calculate each trade volume base on received TP and SL Prices and Risk percent of account in each trade.

    Pips Volatility Alarm Pips Volatility Alarm

    Catching the extreme change on candle.

    SCT - The Overall Percent Risk - MT5 SCT - The Overall Percent Risk - MT5

    Building good trading habits by seeing things in terms of percentage not in terms of money.

    Amplitude (Minimum Maximum) Indicator Amplitude (Minimum Maximum) Indicator

    This Indicator will show the Amplitude [Minimum; Maximum] of a given period and can act as a substitute of the ATR indicator. The indicator can be used to observe volatility and the force of past swings, useful to determine excesses that will possibly be reversed or repeated, given that the user has knowledge to complement with volume or standard-deviation strategies. It is suggested a period of 55200 at M1 or 2400 at H1 (meaning 40 sessions of 23hs each), or any period that complements your strategy.