2015.03.26 11:44:13.934 test (MIX-6.15,H1) Bingo! We done. 2015.03.26 11:44:13.934 test (MIX-6.15,H1) Init OK.
所有可用的工具都包括在市场审查中。
重做了测试。完全扔在MIX上,包括所有其他乐器。
都好了。
该账户在Otkritie是真实的。日图和巳图也是开放的。
2015.03.26 13:56:05.487 测试(MIX-6.15,M1) Bingo!我们完成了。
2015.03.26 13:56:05.020 测试(MIX-6.15,M1) Bingo!我们完成了。
2015.03.26 13:56:02.566 测试(MIX-6.15,M1) Bingo!我们完成了。
2015.03.26 13:56:02.566 测试(MIX-6.15,M1) Bingo!我们完成了。
2015.03.26 13:56:02.560 测试(MIX-6.15,M1) Bingo!我们完成了。
2015.03.26 13:56:01.232 测试(MIX-6.15,M1) Bingo!我们完成了。
2015.03.26 13:56:01.232 测试(MIX-6.15,M1) Bingo!我们完成了。
2015.03.26 13:56:01.144 测试(MIX-6.15,M1) Bingo!我们完成了。
2015.03.26 13:56:01.024 测试(MIX-6.15,M1) Bingo!我们完成了。
2015.03.26 13:56:01.024 测试(MIX-6.15,M1) Init OK。
Real Opening win7 x64 C:\Program Files\Open Broker\terminal64.exe build 1085
谢谢你!
我有。
Win7/64 Ultimate MT5 build 1085
2015.03.26 15:30:37.229 Test (MIX-6.15,M1) Sorry! Get Bars failed. 2015.03.26 15:30:37.229 Test (MIX-6.15,M1) Get Bars failed RTS-6.15 Last error = 4401
我有MIX-6.15落下,WIN 7-64 home premium MT5 build 1085。
2015.03.26 15:44:27.729 Test (MIX-6.15,H1) Get Bars failed MIX-6.15 Last error = 4401 2015.03.26 15:44:27.729 Test (MIX-6.15,H1) Sorry! Get Bars failed.
FORTS用户!
请抽出3分钟的时间!
要修复 "浮动 "错误 - 你需要
更多的统计数据!
Mikalas:
FORTS用户!
请抽出3分钟的时间!
要修复 "浮动 "错误 - 你需要
更多的统计数据!
花费3分钟))
迈克尔,你不能这样做--在inite中的一个请求。不能保证所有数据都已准备好。
这就是你如何做的--当然是凭感觉。
#property copyright "Copyright 2014, MetaQuotes Software Corp." #property link "http://www.mql5.com" #property version "1.00" #property indicator_separate_window #property indicator_buffers 1 #property indicator_plots 1 // bool is_failed = false; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int OnInit() { //--- indicator buffers mapping SymbolSelect( "MIX-6.15", true ); SymbolSelect( "RTS-6.15", true ); SymbolSelect( "Si-6.15", true ); //--- ResetLastError(); //--- int total_bars = Bars( "MIX-6.15", PERIOD_M1 ); if ( total_bars > 0 ) { total_bars = Bars( "RTS-6.15", PERIOD_M1 ); if ( total_bars > 0 ) { total_bars = Bars( "Si-6.15", PERIOD_M1 ); { if ( total_bars > 0 ) { Print( "Init OK." ); } else { is_failed = true; Print( "Get Bars failed Si-6.15 Last error = ", string(GetLastError() ) ); } } } else { is_failed = true; Print( "Get Bars failed RTS-6.15 Last error = ", string(GetLastError() ) ); } } else { is_failed = true; Print( "Get Bars failed MIX-6.15 Last error = ", string(GetLastError() ) ); } //--- return(INIT_SUCCEEDED); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int OnCalculate(const int rates_total, const int prev_calculated, const datetime &time[], const double &open[], const double &high[], const double &low[], const double &close[], const long &tick_volume[], const long &volume[], const int &spread[]) { ResetLastError(); //--- int total_bars = Bars( "MIX-6.15", PERIOD_M1 ); if ( total_bars > 0 ) { total_bars = Bars( "RTS-6.15", PERIOD_M1 ); if ( total_bars > 0 ) { total_bars = Bars( "Si-6.15", PERIOD_M1 ); { if ( total_bars > 0 ) { Print( "Init OK." ); } else { is_failed = true; Print( "Get Bars failed Si-6.15 Last error = ", string(GetLastError() ) ); } } } else { is_failed = true; Print( "Get Bars failed RTS-6.15 Last error = ", string(GetLastError() ) ); } } else { is_failed = true; Print( "Get Bars failed MIX-6.15 Last error = ", string(GetLastError() ) ); } //--- if ( is_failed ) { Print( "Sorry! Get Bars failed." ); } else Print( "Bingo! We done."); //--- return value of prev_calculated for next call return(rates_total); }
一个多货币指标 并不那么简单。
首先,检查仪器的可用性。
bool CorrectSymbol( string symbol ) { ResetLastError(); if ( SymbolInfoDouble( symbol, SYMBOL_BID ) > DBL_EPSILON ) return(true); // символ не выбран в "Обзоре рынка" (нет в списке доступных) if ( GetLastError() == 4302 ) { if ( SymbolSelect( symbol, true ) && SymbolInfoInteger( symbol, SYMBOL_SELECT ) ) return(true); } return(false); }
然后打开所有使用的工具的图表(一个不可见的图表对象就够了),这样历史记录就能正常加载。
然后才尝试用CheckLoadHistory加载历史。
但这可能也不够。
Dima_S:
花费3分钟))
迈克尔,你不能这样做--通过对Inite的一次性请求。不能保证所有的数据都已经准备好了。
这就是你如何做的--当然是凭感觉。
我同意,这有点不对,我重写了代码(见源代码),但结果是一样的!"。
2015.03.26 16:20:55.564 Test (MIX-6.15,M1) Sorry! Get Bars failed. 2015.03.26 16:20:55.564 Test (MIX-6.15,M1) Get Bars failed Si-6.15 Last error = 4401
Mikalas:
你试过我的吗?
同意,有点不正确,重写了代码,但结果是一样的。
下午好!
同样,servodex也不能重现这个错误!
请编译这段代码并将指标 "扔 "到MIX-6.15符号上
(不是来自MetaEditor)
请在这里公布结果(将显示在专家标签中)。