FXT 鏍煎紡鐨勫巻鍙叉枃浠?/h1>

娴嬭瘯鑰呭簲鐢?.FXT 鏂囦欢褰㈡垚鏌辩姸鍥俱€傛瘡涓€涓舰鎴愭煴鐘剁殑杩炵嚎璁板綍浼氬湪鐘舵€佹爮涓婂憟鐜般€? 褰撹繍鐢ㄦā鍨嬫煴鏃?濡傛灉瀹冨垰寮€濮嬪舰鎴?娴嬭瘯鑰呬粠杩欎釜鏂囦欢涓€夋嫨鏂扮殑妯″瀷鏌卞苟鏇存柊鍓嶈竟鐨勬ā鍨嬫煴鎴栧彟澶栧娣汇€?/p>

娴嬭瘯/浼樺寲鏃跺彲浠ユ嫆缁濇爣鍑嗘煴鐨勬ā寮忓寲骞朵娇鐢ㄨ嚜宸辩殑鏁版嵁鏂囦欢銆?涓烘蹇呴』绂佹 “閲嶆柊浼扮畻” 骞舵妸鎵€蹇呴渶鐨凢XT鏂囦欢鏀惧叆/TESTER/HISTORY鏂囦欢澶?鏂囦欢鍚嶅繀椤讳互 “[鍟嗗搧鍚嶇О][鍛ㄦ湡鏃舵]_[妯″瀷绫诲瀷 (0 — 鎸夌収姣忎釜 tick, 1 —鎸夌収妫€娴嬬偣, 2 — 鎸夌収寮€浠?].FXT” (涓嶅甫绌烘牸)鏍煎紡鏄剧ず. 渚嬪锛屽畠鍙互鏄?”EURUSD1440_1.FXT” 鍦?quot;EURUSD” 鏄晢鍝佷繚璇侀噾鐨勪綅缃? “1440″ D1 (1440 鍒嗛挓, 24 灏忔椂)鐨勬椂娈? 骞朵笖 “1″鎰忔€濇槸妫€娴嬬偣鏍囧噯鍖栥€?/p>

涓嬮潰缁欏嚭涓€涓畝鐭殑鏍煎紡鎻忚堪銆傚畠鏄甫鏈変富棰樺紑濮嬬殑锛?/p>

  //+------------------------------------------------------------------+  //|                                                                  |  //+------------------------------------------------------------------+  struct TestHistoryHeader    {     int               version;            // 404     char              copyright[64];      // copyright     char              symbol[12];     int               period;     int               model;              // for what modeling type was the ticks sequence generated     int               bars;               // amount of bars in history     time_t            fromdate;           // ticks generated from this date     time_t            todate;             // ticks generating stopped at this date     double            modelquality;       // modeling quality     //---- general parameters     char              currency[12];       // currency base     int               spread;     int               digits;     double            point;     int               lot_min;            // minimum lot size     int               lot_max;            // maximum lot size     int               lot_step;     int               stops_level;        // stops level value     int               gtc_pendings;       // instruction to close pending orders at the end of day     //---- profit calculation parameters     double            contract_size;      // contract size     double            tick_value;         // value of one tick     double            tick_size;          // size of one tick     int               profit_mode;        // profit calculation mode        { PROFIT_CALC_FOREX, PROFIT_CALC_CFD, PROFIT_CALC_FUTURES }     //---- swap calculation     int               swap_enable;        // enable swap     int               swap_type;          // type of swap                   { SWAP_BY_POINTS, SWAP_BY_DOLLARS, SWAP_BY_INTEREST }     double            swap_long;     double            swap_short;         // swap overnight value     int               swap_rollover3days; // three-days swap rollover     //---- margin calculation     int               leverage;           // leverage     int               free_margin_mode;   // free margin calculation mode   { MARGIN_DONT_USE, MARGIN_USE_ALL, MARGIN_USE_PROFIT, MARGIN_USE_LOSS }     int               margin_mode;        // margin calculation mode        { MARGIN_CALC_FOREX,MARGIN_CALC_CFD,MARGIN_CALC_FUTURES,MARGIN_CALC_CFDINDEX };     int               margin_stopout;     // margin stopout level     int               margin_stopout_mode;// stop out check mode            { MARGIN_TYPE_PERCENT, MARGIN_TYPE_CURRENCY }     double            margin_initial;     // margin requirements     double            margin_maintenance; // margin maintenance requirements     double            margin_hedged;      // margin requirements for hedged positions     double            margin_divider;     // margin divider     char              margin_currency[12];// margin currency     //---- commission calculation     double            comm_base;          // basic commission     int               comm_type;          // basic commission type          { COMM_TYPE_MONEY, COMM_TYPE_PIPS, COMM_TYPE_PERCENT }     int               comm_lots;          // commission per lot or per deal { COMMISSION_PER_LOT, COMMISSION_PER_DEAL }     //---- for internal use     int               from_bar;           // fromdate bar number     int               to_bar;             // todate bar number     int               start_period[6];    // number of bar at which the smaller period modeling started     int               set_from;           // begin date from tester settings     int               set_to;             // end date from tester settings     //----     int               freeze_level;       // order's freeze level in points     //----     int               reserved[61];    };  

鐒跺悗锛屾ā鍨嬫煴鐨勫畨鎺掑涓嬶細

  #pragma pack(push,1)  struct TestHistory    {     time_t            otm;                // bar time     double            open;               // OHLCV values     double            low;     double            high;     double            close;     double            volume;     time_t            ctm;                // the current time within a bar     int               flag;               // flag to launch an expert (0 - bar will be modified, but the expert will not be launched)    };  #pragma pack(pop)  

FXT格式历史文件