编码帮助 - 页 173 1...166167168169170171172173174175176177178179180...786 新评论 Marbo 2013.10.17 13:34 #1721 编码员你好。 我创建了一个非常简单的指标,当最后一个条形图高于或低于sma10时显示一个警报,仅此而已。 如果有人帮助我解决这个问题,我会很高兴。我认为这可能只是一个语法问题。 谢谢你! 附加的文件: test.mq4 3 kb sunshineh 2013.10.17 13:42 #1722 你好。 我不得不再问一次,因为我找不到错误,但我只得到了错误的值 :-( 也许有人能看到我的失败? 这是该指标的代码 #property indicator_chart_window #property indicator_buffers 5 double WidestChannel_high[]; double InsideChannel_high[]; double StandardDeviation[]; double InsideChannel_low[]; double WidestChannel_low[]; extern int STD.Rgres.period=0; /*default 0 means the channel will use the open time from "x" bars back on which ever time period the indicator is attached to. one can change to 1,5, 15,30,60...etc to "lock" the start time to a specific period, and then view the "locked" channels on a different time period...*/ extern int STD.Rgres.length=56; // bars back regression begins extern double STD.Rgres.width=1.618;// widest channel extern double STD.width=0.618; // inside channel int init() { SetIndexBuffer(0,WidestChannel_high); SetIndexLabel(0,"WidestChannel_high"); SetIndexBuffer(1,InsideChannel_high); SetIndexLabel(1,"InsideChannel_high"); SetIndexBuffer(2,StandardDeviation); SetIndexLabel(2,"StandardDeviation"); SetIndexBuffer(3,InsideChannel_low); SetIndexLabel(3,"InsideChannel_low"); SetIndexBuffer(4,WidestChannel_low); SetIndexLabel(4,"WidestChannel_low"); return(0); } int deinit() { ObjectDelete("regression channel");ObjectDelete("std channel");return(0); } int start() { int counted_bars=IndicatorCounted(),limit, iTF; //---- last counted bar will be recounted if(counted_bars>0) counted_bars--; limit=Bars-counted_bars; //to refresh properly delete old objects... ObjectDelete("regression channel");ObjectDelete("std channel"); //widest channel ObjectCreate("regression channel",OBJ_STDDEVCHANNEL,0,iTime(Symbol(),STD.Rgres.period,STD.Rgres.length), Close[STD.Rgres.length],Time[0],Close[0]); ObjectSet("regression channel",OBJPROP_DEVIATION,STD.Rgres.width); ObjectSet("regression channel",OBJPROP_COLOR,Orange); ObjectSet("regression channel",OBJPROP_RAY,true); //inside channel ObjectCreate("std channel",OBJ_STDDEVCHANNEL,0,iTime(Symbol(),STD.Rgres.period,STD.Rgres.length), Close[STD.Rgres.length],Time[0],Close[0]); ObjectSet("std channel",OBJPROP_DEVIATION,STD.width); ObjectSet("std channel",OBJPROP_COLOR,Olive); ObjectSet("std channel",OBJPROP_RAY,true); for(int i=0; i<limit; i++) { double dev = iStdDev(NULL,STD.Rgres.period,STD.Rgres.length,0,MODE_SMA,PRICE_CLOSE,i); double innerWidth = STD.width*dev; double outerWidth = STD.Rgres.width*dev; double price = ObjectGetValueByShift("std channel", i); WidestChannel_high= price + outerWidth/2; InsideChannel_high= price + innerWidth/2; StandardDeviation= price; InsideChannel_low= price - innerWidth/2; WidestChannel_low= price - outerWidth/2; } return(0);} Coding help Objects Regression and StdDevChannel Multi Timeframe Indicators Mladen Rakic 2013.10.17 14:08 #1723 sunshineh: 你好。我不得不再问一次,因为我找不到错误,但我只得到了错误的值 :-( 也许有人能看到我的失败? 这是该指标的代码 #property indicator_chart_window #property indicator_buffers 5 double WidestChannel_high[]; double InsideChannel_high[]; double StandardDeviation[]; double InsideChannel_low[]; double WidestChannel_low[]; extern int STD.Rgres.period=0; /*default 0 means the channel will use the open time from "x" bars back on which ever time period the indicator is attached to. one can change to 1,5, 15,30,60...etc to "lock" the start time to a specific period, and then view the "locked" channels on a different time period...*/ extern int STD.Rgres.length=56; // bars back regression begins extern double STD.Rgres.width=1.618;// widest channel extern double STD.width=0.618; // inside channel int init() { SetIndexBuffer(0,WidestChannel_high); SetIndexLabel(0,"WidestChannel_high"); SetIndexBuffer(1,InsideChannel_high); SetIndexLabel(1,"InsideChannel_high"); SetIndexBuffer(2,StandardDeviation); SetIndexLabel(2,"StandardDeviation"); SetIndexBuffer(3,InsideChannel_low); SetIndexLabel(3,"InsideChannel_low"); SetIndexBuffer(4,WidestChannel_low); SetIndexLabel(4,"WidestChannel_low"); return(0); } int deinit() { ObjectDelete("regression channel");ObjectDelete("std channel");return(0); } int start() { int counted_bars=IndicatorCounted(),limit, iTF; //---- last counted bar will be recounted if(counted_bars>0) counted_bars--; limit=Bars-counted_bars; //to refresh properly delete old objects... ObjectDelete("regression channel");ObjectDelete("std channel"); //widest channel ObjectCreate("regression channel",OBJ_STDDEVCHANNEL,0,iTime(Symbol(),STD.Rgres.period,STD.Rgres.length), Close[STD.Rgres.length],Time[0],Close[0]); ObjectSet("regression channel",OBJPROP_DEVIATION,STD.Rgres.width); ObjectSet("regression channel",OBJPROP_COLOR,Orange); ObjectSet("regression channel",OBJPROP_RAY,true); //inside channel ObjectCreate("std channel",OBJ_STDDEVCHANNEL,0,iTime(Symbol(),STD.Rgres.period,STD.Rgres.length), Close[STD.Rgres.length],Time[0],Close[0]); ObjectSet("std channel",OBJPROP_DEVIATION,STD.width); ObjectSet("std channel",OBJPROP_COLOR,Olive); ObjectSet("std channel",OBJPROP_RAY,true); for(int i=0; i<limit; i++) { double dev = iStdDev(NULL,STD.Rgres.period,STD.Rgres.length,0,MODE_SMA,PRICE_CLOSE,i); double innerWidth = STD.width*dev; double outerWidth = STD.Rgres.width*dev; double price = ObjectGetValueByShift("std channel", i); WidestChannel_high= price + outerWidth/2; InsideChannel_high= price + innerWidth/2; StandardDeviation= price; InsideChannel_low= price - innerWidth/2; WidestChannel_low= price - outerWidth/2; } return(0);} sunshineh, 你不必用偏差除以2来得到高点和低点--去掉"/2 "部分,只要中间价格没有问题就可以了。通道的宽度始终是恒定的:当前的标准缩写应被用于与,而不是其他的值。最后,在我看来,ObjectGetValueByShift("std channel", i);对标准偏差 通道不起作用,因为它对趋势线起作用。我不知道它返回的是什么值(见附件中的指标,你会明白我为什么说我不知道那个价格是什么)。 附加的文件: _test_4.mq4 3 kb manone 2013.10.17 14:26 #1724 你好,我是mladen。 我附上一个使用内部预设符号的样本指标,我很难理解里面的内容,是否有可能从这个指标中得到一些提示,以适应我的指标或/和你的指标,防止重绘或刷新移位线问题/ick问题,或做出某种协同作用? 谢谢你的关注。 Mladen Rakic 2013.10.17 14:40 #1725 kenwa: HI mladen,我附上一个使用内部预设符号的样本指标,我很难理解里面的内容,是否有可能从这个指标中得到一些提示,以适应我的指标或/和你的指标,以防止重绘或刷新移位线问题/ick问题或做出某种协同作用? 谢谢你的关注。 肯瓦 我不从事反编译的工作。抱歉 manone 2013.10.17 14:47 #1726 mladen: kenwa 我不从事反编译的工作。抱歉 好吧,那我就删除 它,但有趣的是,为什么没有人查看它,但你可以知道它是反编译的东西。 Mladen Rakic 2013.10.17 14:49 #1727 kenwa: 好吧,我把它删除了,但有趣的是,为什么没有人查看它,但你可以知道它是反编译的东西 每个对编码稍有了解的人都知道,这是一个反编译的代码。 即使你对任何编码都一无所知,当你有这样的东西时。 /*由EX4-TO-MQ4反编译器FREEWARE V4.0.451.1生成 [-] 。 网站。MetaTrader 5 交易平台 / MetaQuotes 软件公司。 电子邮件 :support@metaquotes.net */ 写在你发布的指标的前几行,似乎相当明显,任何人都可以看到它是一个反编译的代码,所以,请... 祝您一切顺利 Marbo 2013.10.17 15:23 #1728 mladen,我的代码没有被反编译,也许你想看一下? Mladen Rakic 2013.10.17 15:41 #1729 Marbo: mladen,我的代码没有被反编译,也许你想看一下它? 马博 你可以做一些像附件中的事情。它将在每个目标时间段的条形图上或在状态(警报的类型)改变时向你发出警报。如果你希望忽略类型,就跳过doAlert程序中的类型检查。如果你想跳过时间检查(在这种情况下,只有类型会被检查),那么就跳过doAlert程序中的时间检查。 附加的文件: test_4.mq4 3 kb [删除] 2013.10.17 15:49 #1730 嗨,mladen。 你可能还记得,上周我在MA交叉EA方面寻求了一些帮助。 当然,我不恰当地提到了精英部分。你能建议我应该在哪里寻求帮助吗?我找过了,但没有找到明显的答案。为了唤起你的记忆,这是一个规格。 1.均线EMA交叉 2.蜡烛收盘时 3.在新的方向上放置新订单的OCO 4.调整滑点的能力 5.交叉的声音信号 6.如果没有可设置的点位差距,交叉就不是真正的交叉。 7.如果可能的话,在烛光监测中,如果一个烛光超过ATR的X倍(可设置的数字),就会在这个烛光的方向上下一个订单,并发出警报,同样,也可以关闭一个订单,但不启动一个新的。 8.最好是像7中那样下单,发出警报。 9.十字架的可靠性是最重要的。在我的图表中--FXCM、Vantage、FX Choice--一些EA,包括Universal Cross不进行交易或太晚。 10.可设置SL,但如果不需要,可以不设置 11.拖曳止损 12.盈利X点后,止损点自动转为盈亏平衡点 13.最大开仓交易数 14.神奇的数字 谢谢 杰夫 1...166167168169170171172173174175176177178179180...786 新评论 原因: 取消 您错过了交易机会: 免费交易应用程序 8,000+信号可供复制 探索金融市场的经济新闻 注册 登录 拉丁字符(不带空格) 密码将被发送至该邮箱 发生错误 使用 Google 登录 您同意网站政策和使用条款 如果您没有帐号,请注册 可以使用cookies登录MQL5.com网站。 请在您的浏览器中启用必要的设置,否则您将无法登录。 忘记您的登录名/密码? 使用 Google 登录
编码员你好。
我创建了一个非常简单的指标,当最后一个条形图高于或低于sma10时显示一个警报,仅此而已。
如果有人帮助我解决这个问题,我会很高兴。我认为这可能只是一个语法问题。
谢谢你!
你好。
我不得不再问一次,因为我找不到错误,但我只得到了错误的值 :-(
也许有人能看到我的失败?
这是该指标的代码
#property indicator_chart_window
#property indicator_buffers 5
double WidestChannel_high[];
double InsideChannel_high[];
double StandardDeviation[];
double InsideChannel_low[];
double WidestChannel_low[];
extern int STD.Rgres.period=0; /*default 0 means the channel will use the open
time from "x" bars back on which ever time period
the indicator is attached to. one can change to 1,5,
15,30,60...etc to "lock" the start time to a specific
period, and then view the "locked" channels on a different time period...*/
extern int STD.Rgres.length=56; // bars back regression begins
extern double STD.Rgres.width=1.618;// widest channel
extern double STD.width=0.618; // inside channel
int init()
{
SetIndexBuffer(0,WidestChannel_high);
SetIndexLabel(0,"WidestChannel_high");
SetIndexBuffer(1,InsideChannel_high);
SetIndexLabel(1,"InsideChannel_high");
SetIndexBuffer(2,StandardDeviation);
SetIndexLabel(2,"StandardDeviation");
SetIndexBuffer(3,InsideChannel_low);
SetIndexLabel(3,"InsideChannel_low");
SetIndexBuffer(4,WidestChannel_low);
SetIndexLabel(4,"WidestChannel_low");
return(0);
}
int deinit() {
ObjectDelete("regression channel");ObjectDelete("std channel");return(0);
}
int start() {
int counted_bars=IndicatorCounted(),limit, iTF;
//---- last counted bar will be recounted
if(counted_bars>0) counted_bars--;
limit=Bars-counted_bars;
//to refresh properly delete old objects...
ObjectDelete("regression channel");ObjectDelete("std channel");
//widest channel
ObjectCreate("regression channel",OBJ_STDDEVCHANNEL,0,iTime(Symbol(),STD.Rgres.period,STD.Rgres.length),
Close[STD.Rgres.length],Time[0],Close[0]);
ObjectSet("regression channel",OBJPROP_DEVIATION,STD.Rgres.width);
ObjectSet("regression channel",OBJPROP_COLOR,Orange);
ObjectSet("regression channel",OBJPROP_RAY,true);
//inside channel
ObjectCreate("std channel",OBJ_STDDEVCHANNEL,0,iTime(Symbol(),STD.Rgres.period,STD.Rgres.length),
Close[STD.Rgres.length],Time[0],Close[0]);
ObjectSet("std channel",OBJPROP_DEVIATION,STD.width);
ObjectSet("std channel",OBJPROP_COLOR,Olive);
ObjectSet("std channel",OBJPROP_RAY,true);
for(int i=0; i<limit; i++)
{
double dev = iStdDev(NULL,STD.Rgres.period,STD.Rgres.length,0,MODE_SMA,PRICE_CLOSE,i);
double innerWidth = STD.width*dev;
double outerWidth = STD.Rgres.width*dev;
double price = ObjectGetValueByShift("std channel", i);
WidestChannel_high= price + outerWidth/2;
InsideChannel_high= price + innerWidth/2;
StandardDeviation= price;
InsideChannel_low= price - innerWidth/2;
WidestChannel_low= price - outerWidth/2;
}
return(0);}你好。
我不得不再问一次,因为我找不到错误,但我只得到了错误的值 :-(
也许有人能看到我的失败?
这是该指标的代码
#property indicator_chart_window
#property indicator_buffers 5
double WidestChannel_high[];
double InsideChannel_high[];
double StandardDeviation[];
double InsideChannel_low[];
double WidestChannel_low[];
extern int STD.Rgres.period=0; /*default 0 means the channel will use the open
time from "x" bars back on which ever time period
the indicator is attached to. one can change to 1,5,
15,30,60...etc to "lock" the start time to a specific
period, and then view the "locked" channels on a different time period...*/
extern int STD.Rgres.length=56; // bars back regression begins
extern double STD.Rgres.width=1.618;// widest channel
extern double STD.width=0.618; // inside channel
int init()
{
SetIndexBuffer(0,WidestChannel_high);
SetIndexLabel(0,"WidestChannel_high");
SetIndexBuffer(1,InsideChannel_high);
SetIndexLabel(1,"InsideChannel_high");
SetIndexBuffer(2,StandardDeviation);
SetIndexLabel(2,"StandardDeviation");
SetIndexBuffer(3,InsideChannel_low);
SetIndexLabel(3,"InsideChannel_low");
SetIndexBuffer(4,WidestChannel_low);
SetIndexLabel(4,"WidestChannel_low");
return(0);
}
int deinit() {
ObjectDelete("regression channel");ObjectDelete("std channel");return(0);
}
int start() {
int counted_bars=IndicatorCounted(),limit, iTF;
//---- last counted bar will be recounted
if(counted_bars>0) counted_bars--;
limit=Bars-counted_bars;
//to refresh properly delete old objects...
ObjectDelete("regression channel");ObjectDelete("std channel");
//widest channel
ObjectCreate("regression channel",OBJ_STDDEVCHANNEL,0,iTime(Symbol(),STD.Rgres.period,STD.Rgres.length),
Close[STD.Rgres.length],Time[0],Close[0]);
ObjectSet("regression channel",OBJPROP_DEVIATION,STD.Rgres.width);
ObjectSet("regression channel",OBJPROP_COLOR,Orange);
ObjectSet("regression channel",OBJPROP_RAY,true);
//inside channel
ObjectCreate("std channel",OBJ_STDDEVCHANNEL,0,iTime(Symbol(),STD.Rgres.period,STD.Rgres.length),
Close[STD.Rgres.length],Time[0],Close[0]);
ObjectSet("std channel",OBJPROP_DEVIATION,STD.width);
ObjectSet("std channel",OBJPROP_COLOR,Olive);
ObjectSet("std channel",OBJPROP_RAY,true);
for(int i=0; i<limit; i++)
{
double dev = iStdDev(NULL,STD.Rgres.period,STD.Rgres.length,0,MODE_SMA,PRICE_CLOSE,i);
double innerWidth = STD.width*dev;
double outerWidth = STD.Rgres.width*dev;
double price = ObjectGetValueByShift("std channel", i);
WidestChannel_high= price + outerWidth/2;
InsideChannel_high= price + innerWidth/2;
StandardDeviation= price;
InsideChannel_low= price - innerWidth/2;
WidestChannel_low= price - outerWidth/2;
}
return(0);}sunshineh,
你不必用偏差除以2来得到高点和低点--去掉"/2 "部分,只要中间价格没有问题就可以了。通道的宽度始终是恒定的:当前的标准缩写应被用于与,而不是其他的值。最后,在我看来,ObjectGetValueByShift("std channel", i);对标准偏差 通道不起作用,因为它对趋势线起作用。我不知道它返回的是什么值(见附件中的指标,你会明白我为什么说我不知道那个价格是什么)。
你好,我是mladen。
我附上一个使用内部预设符号的样本指标,我很难理解里面的内容,是否有可能从这个指标中得到一些提示,以适应我的指标或/和你的指标,防止重绘或刷新移位线问题/ick问题,或做出某种协同作用? 谢谢你的关注。
HI mladen,我附上一个使用内部预设符号的样本指标,我很难理解里面的内容,是否有可能从这个指标中得到一些提示,以适应我的指标或/和你的指标,以防止重绘或刷新移位线问题/ick问题或做出某种协同作用? 谢谢你的关注。
肯瓦
我不从事反编译的工作。抱歉
kenwa 我不从事反编译的工作。抱歉
好吧,那我就删除 它,但有趣的是,为什么没有人查看它,但你可以知道它是反编译的东西。
好吧,我把它删除了,但有趣的是,为什么没有人查看它,但你可以知道它是反编译的东西
每个对编码稍有了解的人都知道,这是一个反编译的代码。
即使你对任何编码都一无所知,当你有这样的东西时。
由EX4-TO-MQ4反编译器FREEWARE V4.0.451.1生成 [-] 。
网站。MetaTrader 5 交易平台 / MetaQuotes 软件公司。
电子邮件 :support@metaquotes.net
*/
写在你发布的指标的前几行,似乎相当明显,任何人都可以看到它是一个反编译的代码,所以,请...
祝您一切顺利
mladen,我的代码没有被反编译,也许你想看一下?
mladen,我的代码没有被反编译,也许你想看一下它?
马博
你可以做一些像附件中的事情。它将在每个目标时间段的条形图上或在状态(警报的类型)改变时向你发出警报。如果你希望忽略类型,就跳过doAlert程序中的类型检查。如果你想跳过时间检查(在这种情况下,只有类型会被检查),那么就跳过doAlert程序中的时间检查。
嗨,mladen。
你可能还记得,上周我在MA交叉EA方面寻求了一些帮助。 当然,我不恰当地提到了精英部分。你能建议我应该在哪里寻求帮助吗?我找过了,但没有找到明显的答案。为了唤起你的记忆,这是一个规格。
1.均线EMA交叉
2.蜡烛收盘时
3.在新的方向上放置新订单的OCO
4.调整滑点的能力
5.交叉的声音信号
6.如果没有可设置的点位差距,交叉就不是真正的交叉。
7.如果可能的话,在烛光监测中,如果一个烛光超过ATR的X倍(可设置的数字),就会在这个烛光的方向上下一个订单,并发出警报,同样,也可以关闭一个订单,但不启动一个新的。
8.最好是像7中那样下单,发出警报。
9.十字架的可靠性是最重要的。在我的图表中--FXCM、Vantage、FX Choice--一些EA,包括Universal Cross不进行交易或太晚。
10.可设置SL,但如果不需要,可以不设置
11.拖曳止损
12.盈利X点后,止损点自动转为盈亏平衡点
13.最大开仓交易数
14.神奇的数字
谢谢
杰夫