来自一个 "傻瓜 "的问题 - 页 105 1...9899100101102103104105106107108109110111112...277 新评论 roman epifanov 2012.02.22 10:51 #1041 uncleVic: 更详细一点...日志中的下一行(或更好的几行)是什么?2012.02.22 12:51:15 st (EURUSD,H1) CExpertBase::SetOtherSeries: 更改时间序列是禁止的 2012.02.22 12:51:15 st (EURUSD,H1) CExpertBase::SetPriceSeries: 更改时间序列是禁止的无他 Victor Kirillin 2012.02.22 10:55 #1042 openlive:2012.02.22 12:51:15 st (EURUSD,H1) CExpertBase::SetOtherSeries: 更改时间序列是禁止的 2012.02.22 12:51:15 st (EURUSD,H1) CExpertBase::SetPriceSeries: 更改时间序列是禁止的无他 我在某个地方找到了一个旧模块。请附上你在向导中得到的专家顾问的代码。这不是秘密,是吗? roman epifanov 2012.02.22 11:04 #1043 uncleVic: 某处有一个旧式的模块。请附上在向导中获得的EA代码。这不是什么秘密,是吗?//+------------------------------------------------------------------+ //| Expert_Candles.mq5 | //| Copyright 2010, MetaQuotes Software Corp. | //| http://www.mql5.com | //+------------------------------------------------------------------+ #property copyright "Copyright 2010, MetaQuotes Software Corp." #property link "http://www.mql5.com" #property version "1.00" //+------------------------------------------------------------------+ //| Include | //+------------------------------------------------------------------+ #include <Expert\Expert.mqh> #include <Expert\Signal\SignalCandles.mqh> #include <Expert\Trailing\TrailingNone.mqh> #include <Expert\Money\MoneyFixedLot.mqh> //+------------------------------------------------------------------+ //| Inputs | //+------------------------------------------------------------------+ //--- inputs for expert input string Inp_Expert_Title ="Expert_Candles"; int Expert_MagicNumber =28148; bool Expert_EveryTick =false; //--- inputs for signal input int Inp_Signal_Candles_Range =3; input int Inp_Signal_Candles_Minimum =50; input double Inp_Signal_Candles_ShadowBig =0.5; input double Inp_Signal_Candles_ShadowSmall=0.2; input double Inp_Signal_Candles_Limit =0.0; input double Inp_Signal_Candles_StopLoss =2.0; input double Inp_Signal_Candles_TakeProfit =1.0; input int Inp_Signal_Candles_Expiration =4; //--- inputs for money input double Inp_Money_FixLot_Percent =10.0; input double Inp_Money_FixLot_Lots =0.1; //+------------------------------------------------------------------+ //| Global expert object | //+------------------------------------------------------------------+ CExpert ExtExpert; //+------------------------------------------------------------------+ //| Initialization function of the expert | //+------------------------------------------------------------------+ int OnInit() { //--- Initializing expert if(!ExtExpert.Init(Symbol(),Period(),Expert_EveryTick,Expert_MagicNumber)) { //--- failed printf(__FUNCTION__+": error initializing expert"); ExtExpert.Deinit(); return(-1); } //--- Creation of signal object CSignalCandles *signal=new CSignalCandles; if(signal==NULL) { //--- failed printf(__FUNCTION__+": error creating signal"); ExtExpert.Deinit(); return(-2); } //--- Add signal to expert (will be deleted automatically)) if(!ExtExpert.InitSignal(signal)) { //--- failed printf(__FUNCTION__+": error initializing signal"); ExtExpert.Deinit(); return(-3); } //--- Set signal parameters signal.Range(Inp_Signal_Candles_Range); signal.Minimum(Inp_Signal_Candles_Minimum); signal.ShadowBig(Inp_Signal_Candles_ShadowBig); signal.ShadowSmall(Inp_Signal_Candles_ShadowSmall); signal.Limit(Inp_Signal_Candles_Limit); signal.StopLoss(Inp_Signal_Candles_StopLoss); signal.TakeProfit(Inp_Signal_Candles_TakeProfit); signal.Expiration(Inp_Signal_Candles_Expiration); //--- Check signal parameters if(!signal.ValidationSettings()) { //--- failed printf(__FUNCTION__+": error signal parameters"); ExtExpert.Deinit(); return(-4); } //--- Creation of trailing object CTrailingNone *trailing=new CTrailingNone; if(trailing==NULL) { //--- failed printf(__FUNCTION__+": error creating trailing"); ExtExpert.Deinit(); return(-5); } //--- Add trailing to expert (will be deleted automatically)) if(!ExtExpert.InitTrailing(trailing)) { //--- failed printf(__FUNCTION__+": error initializing trailing"); ExtExpert.Deinit(); return(-6); } //--- Set trailing parameters //--- Check trailing parameters if(!trailing.ValidationSettings()) { //--- failed printf(__FUNCTION__+": error trailing parameters"); ExtExpert.Deinit(); return(-7); } //--- Creation of money object CMoneyFixedLot *money=new CMoneyFixedLot; if(money==NULL) { //--- failed printf(__FUNCTION__+": error creating money"); ExtExpert.Deinit(); return(-8); } //--- Add money to expert (will be deleted automatically)) if(!ExtExpert.InitMoney(money)) { //--- failed printf(__FUNCTION__+": error initializing money"); ExtExpert.Deinit(); return(-9); } //--- Set money parameters money.Percent(Inp_Money_FixLot_Percent); money.Lots(Inp_Money_FixLot_Lots); //--- Check money parameters if(!money.ValidationSettings()) { //--- failed printf(__FUNCTION__+": error money parameters"); ExtExpert.Deinit(); return(-10); } //--- Tuning of all necessary indicators if(!ExtExpert.InitIndicators()) { //--- failed printf(__FUNCTION__+": error initializing indicators"); ExtExpert.Deinit(); return(-11); } //--- ok return(0); } //+------------------------------------------------------------------+ //| Deinitialization function of the expert | //+------------------------------------------------------------------+ void OnDeinit(const int reason) { ExtExpert.Deinit(); } //+------------------------------------------------------------------+ //| Function-event handler "tick" | //+------------------------------------------------------------------+ void OnTick() { ExtExpert.OnTick(); } //+------------------------------------------------------------------+ //| Function-event handler "trade" | //+------------------------------------------------------------------+ void OnTrade() { ExtExpert.OnTrade(); } //+------------------------------------------------------------------+ //| Function-event handler "timer" | //+------------------------------------------------------------------+ void OnTimer() { ExtExpert.OnTimer(); } //+------------------------------------------------------------------+ [删除] 2012.02.22 11:38 #1044 mql5: 谢谢你,请允许我问一个简单的问题--两个进程从同一个网站上读取信息,这是否可以接受? Victor Kirillin 2012.02.22 11:43 #1045 openlive: 奇怪的是,这段代码竟然可以编译。#include <Expert\Signal\SignalCandles.mqh> - это старый модульPS 该文件可能只是附加的。 roman epifanov 2012.02.22 11:52 #1046 uncleVic: 奇怪的是,这段代码竟然可以编译。PS 该文件可能只是附加的。问题是,测试器用起来很好......但它在交易中能用吗?据我所知,没有新的模块,那么我应该在这个模块中做什么,如果不难的话? Victor Kirillin 2012.02.22 11:58 #1047 openlive:问题是,测试器用起来很好......但它在交易中能用吗?据我所知,没有新的模块? 那我在这个模块中要做什么,如果不难的话?它将发挥作用。你必须在CSignalCandles::ValidationSettings()方法中插入它,在最开始。//--- call of the method of the parent class if(!CExpertSignal::ValidationSettings()) return(false); roman epifanov 2012.02.22 12:15 #1048 uncleVic:它将发挥作用。为了避免它,在CSignalCandles::ValidationSettings()方法中插入它,在最开始。bool CSignalCandles::ValidationSettings() { if(!CExpertSignal::ValidationSettings()) return(false); if(m_range<=0) { printf(__FUNCTION__+": candles range must be greater than 0"); return(false); } //--- ok return(true); } 所以它已经存在了。 Ilyas 2012.02.22 12:36 #1049 220Volt: 谢谢你,请允许我问一个简单的问题--两个进程从同一区域读取数据是否可以接受? 是的,阅读时没有任何问题。 Victor Kirillin 2012.02.22 13:49 #1050 openlive: 它已经在这里了。 任务...请附上信号模块(我没有)。让我们看一看。 1...9899100101102103104105106107108109110111112...277 新评论 您错过了交易机会: 免费交易应用程序 8,000+信号可供复制 探索金融市场的经济新闻 注册 登录 拉丁字符(不带空格) 密码将被发送至该邮箱 发生错误 使用 Google 登录 您同意网站政策和使用条款 如果您没有帐号,请注册 可以使用cookies登录MQL5.com网站。 请在您的浏览器中启用必要的设置,否则您将无法登录。 忘记您的登录名/密码? 使用 Google 登录
更详细一点...日志中的下一行(或更好的几行)是什么?
2012.02.22 12:51:15 st (EURUSD,H1) CExpertBase::SetOtherSeries: 更改时间序列是禁止的
2012.02.22 12:51:15 st (EURUSD,H1) CExpertBase::SetPriceSeries: 更改时间序列是禁止的
无他
2012.02.22 12:51:15 st (EURUSD,H1) CExpertBase::SetOtherSeries: 更改时间序列是禁止的
2012.02.22 12:51:15 st (EURUSD,H1) CExpertBase::SetPriceSeries: 更改时间序列是禁止的
无他
某处有一个旧式的模块。请附上在向导中获得的EA代码。这不是什么秘密,是吗?
#include <Expert\Signal\SignalCandles.mqh> - это старый модуль
PS 该文件可能只是附加的。
奇怪的是,这段代码竟然可以编译。
PS 该文件可能只是附加的。
问题是,测试器用起来很好......但它在交易中能用吗?
据我所知,没有新的模块,那么我应该在这个模块中做什么,如果不难的话?
问题是,测试器用起来很好......但它在交易中能用吗?
据我所知,没有新的模块? 那我在这个模块中要做什么,如果不难的话?
它将发挥作用。你必须在CSignalCandles::ValidationSettings()方法中插入它,在最开始。
它将发挥作用。为了避免它,在CSignalCandles::ValidationSettings()方法中插入它,在最开始。
谢谢你,请允许我问一个简单的问题--两个进程从同一区域读取数据是否可以接受?
它已经在这里了。