*BUMP*
Slawa, please respond if possible. Thanks!
Slawa, please respond if possible. Thanks!
Did You consider "MQL4: FXTHeader" and naming convention?
i_bars must be more than 100 (first 100 bars are not modelled and must be written as is)
i_from and i_to members of section "for internal use" must be zeroed
i_from and i_to members of section "for internal use" must be zeroed
//---- for internal use ------- int i_from_bar=0; // 'fromdate' bar number // 312 + 4 int i_to_bar=0; // 'todate' bar number // 316 + 4 int i_start_period[6]; // 320 + 24 int i_from=0; // must be zero // 344 + 4 int i_to=0; // must be zero // 348 + 4 int i_reserved[62]; // unused // 352 + 248 = 600
As far as I know I'm doing all that.
May I zip and send you my .fxt file so you can analyze? Zipped it's 280k. I'm sure you could tell in a few seconds what is wrong.
Please provide an email address if that's OK.
May I zip and send you my .fxt file so you can analyze? Zipped it's 280k. I'm sure you could tell in a few seconds what is wrong.
Please provide an email address if that's OK.
stringo AT metaquotes DOT ru
Check header for:
i_lot_step>0
i_stops_level>0
Recommendations:
i_spread>0
i_lot_max>0
d_contract_size>0
d_tick_value>0
d_tick_size>0
All these values can be obtained by MarketInfo function. See first part of WriteHeader function for example
i_lot_step>0
i_stops_level>0
Recommendations:
i_spread>0
i_lot_max>0
d_contract_size>0
d_tick_value>0
d_tick_size>0
All these values can be obtained by MarketInfo function. See first part of WriteHeader function for example
//---- FXT file header s_symbol=symbol; i_period=period; i_bars=0; s_currency=StringSubstr(s_symbol,0,3); i_spread=MarketInfo(s_symbol,MODE_SPREAD); i_digits=Digits; d_point=Point; i_lot_min=MarketInfo(s_symbol,MODE_MINLOT)*100; i_lot_max=MarketInfo(s_symbol,MODE_MAXLOT)*100; i_lot_step=MarketInfo(s_symbol,MODE_LOTSTEP)*100; i_stops_level=MarketInfo(s_symbol,MODE_STOPLEVEL); d_contract_size=MarketInfo(s_symbol,MODE_LOTSIZE); d_tick_value=MarketInfo(s_symbol,MODE_TICKVALUE); d_tick_size=MarketInfo(s_symbol,MODE_TICKSIZE); i_profit_mode=MarketInfo(s_symbol,MODE_PROFITCALCMODE); i_swap_type=MarketInfo(s_symbol,MODE_SWAPTYPE); d_swap_long=MarketInfo(s_symbol,MODE_SWAPLONG); d_swap_short=MarketInfo(s_symbol,MODE_SWAPSHORT); i_free_margin_mode=AccountFreeMarginMode(); i_margin_mode=MarketInfo(s_symbol,MODE_MARGINCALCMODE); i_margin_stopout=AccountStopoutLevel(); i_margin_stopout_mode=AccountStopoutMode(); d_margin_initial=MarketInfo(s_symbol,MODE_MARGININIT); d_margin_maintenance=MarketInfo(s_symbol,MODE_MARGINMAINTENANCE); d_margin_hedged=MarketInfo(s_symbol,MODE_MARGINHEDGED); s_margin_currency=StringSubstr(s_symbol,0,3); i_from_bar=start_bar; i_start_period[0]=start_bar; //----

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I create the .fxt file OK, with a 600-byte header, but when I use it in the tester the file is rejected and a new file is created. I can view the file OK in "offline charts", I just can't use it in the tester; it recreates the file.
My question is: what fields/values are required in the header in order for MT4 to accept the fxt file (spread, tickvalue, etc)?
I found some information here: "importing tick data to history center" However, supplying the values listed in the C-code snippet didn't fix the problem.
Thanks for your help!