FXT形式の履歴ファイル

履歴ファイル テスト
履歴ファイル

FXT形式の履歴ファイル

テスターは、その作動において、生成された継続バーのある*.FXTファイルを使用します。生成された継続性の各記録は1つのバー内のいずれかの時点を現します。バーのモデリング時には、テスターはこのファイルから他のバーを取り出して、現在バーを更新するか、生成が始まったばかりの場合には別のバーを追加します。

標準バーモデル化の適用を拒否することができますが、テスト/最適化には独自のデータファイルを使用します。それを行うには、「再計算」を無効にして、希望するFXTファイルを/TESTER/HISTORYフォルダに入れる必要があります。ファイル名は「[通貨ペア名][周期(分単位)]_[モデル化のタイプ(0:レートの更新ごと、1:コントロールポイント、2:オープン価格)].FXT」(間にスペース文字はありません)でなければなりません。たとえば、「EURUSD」が通貨ペアの場合は 「EURUSD1440_1.FXT」 とすることができ、「1440」 はD1の周期(1440分、24 時間)、「1」はコントロールポイントによるモデル化を意味します。

形式の簡単な説明を以下に示します。ヘッダーで始まります。
//+——————————————————————+
//| |
//+——————————————————————+
struct TestHistoryHeader
{
int version; // 403
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 reserved[62];
};
次に、モデル化されたバーの配列が続きます。
#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)

 

コメント

タイトルとURLをコピーしました