[警告关闭!]任何新手问题,为了不给论坛添乱。专业人士,不要走过。没有你,哪里都不能去。 - 页 903 1...896897898899900901902903904905906907908909910...1145 新评论 Dimka-novitsek 2010.10.11 14:47 #9021 我已经学会了如何插入Alert(GetLastError());我已经成功地纠正了错误,但我无法应对错误130!!!!。错误是错误的停止。 问价-止损*点在买入订单中,这里我从底价中扣除了止损乘以点,这就给出了下跌的点数。 在卖出订单的情况下,情况正好相反--出价+止损*点。一切都非常正确,正确的!!!!!!!!。 Stoploss在功能中的位置,我从后面和前面都数过了!我试过不同的尺寸! I'm in STUPIDS!!!!! 帮助我!!!!!!!!!! Dimka-novitsek 2010.10.11 14:49 #9022 //+------------------------------------------------------------------+ //| 迪蒙的边界.mq4 || //| Copyright © 2010, MetaQuotes Software Corp. //| http://www.metaquotes.net | //+------------------------------------------------------------------+ #property copyright"Copyright © 2010, MetaQuotes Software Corp. #属性链接 "http://www.metaquotes.net" //+------------------------------------------------------------------+ //|专家初始化功能 | //+------------------------------------------------------------------+ Extern int BandsPeriod=20,i=1 ;extern int BandsShift=0; 外置双倍BandsDeviations=2.0。 extern double Lots=0.1,TakeProfit=50,stoploss=10。 int init() { //---- //---- return(0); } //+------------------------------------------------------------------+ //|专家去初始化功能| //+------------------------------------------------------------------+ int deinit() { //---- //---- return(0); } //+------------------------------------------------------------------+ //|专家启动功能| //+------------------------------------------------------------------+ int start() {double Average,Verhnyayaghranytsa,Nyzhnyayaghranytsa,newres,sum,deviation; string text; int ticket; int err; text="MACD样本"。 Average=iMA(NULL,0,BandsPeriod,BandsShift,MODE_SMA,PRICE_CLOSE,i)。 //---- newres=Close[i]-Average。 sum=newres*newres。 偏差=BandsDeviations*MathSqrt(sum/BandsPeriod)。 Verhnyayaghranytsa=平均值+偏差。 Nyzhnyayaghranytsa=平均数-偏差。 //---- 如果(Verhnyayaghranytsa<Close[i]) { Comment(" buoy!",Verhnyayaghranytsa ) 。 ticket=OrderSend(Symbol(,OP_BUY,Lots,Bid,3,Ask-stoploss*Point,Bid+TakeProfit*Point, "macd sample",16384,0,Green); } 如果(Nyzhnyayaghranytsa>Close[i]) { Comment(" sell!",Nyzhnyayaghranytsa ) 。 ticket=OrderSend(Symbol(,OP_SELL,Lots,Ask,3,Bid+stoploss*Point,Ask-TakeProfit*Point, "macd sample",16384,0,Red); 警告(GetLastError())。 } return(0); } //+------------------------------------------------------------------+ [WARNING CLOSED!] Any newbie [存档]任何菜鸟问题,为了不使论坛变得杂乱无章。专业人士,不要路过。没有你就无处可去 - 3. [存档!]任何菜鸟问题,为了不使论坛变得混乱。专业人士,不要路过。没有你,哪里都不能去 - 4. Dimka-novitsek 2010.10.11 14:52 #9023 一般来说,我以任何方式改变问价和出价,但仍然是一样的--130! Victor Nikolaev 2010.10.11 14:55 #9024 Dimka-novitsek: 一般来说,我以任何方式改变问价和出价,但仍然是一样的--130! 而且你还应该检查StopLevel。 Dimka-novitsek 2010.10.11 14:59 #9025 这是什么???? alnov 2010.10.11 15:07 #9026 Vinin: IndicatorShortName(""); SetIndexLabel(0, ""); SetIndexLabel(1, ""); SetIndexLabel(5, ""); SetIndexLabel(6, ""); 非常感谢你,90%的人都有帮助--仍然有零,但它们一般不会干扰,也不会与指标!!!!。 Victor Nikolaev 2010.10.11 15:08 #9027 Dimka-novitsek: 这是什么???? doubleMarketInfo( 字符串, int 类型) 返回有关市场观察中所列金融工具的各种信息。当前金融工具的一些信息被储存在预定义的变量 中。 MODE_STOPLEVEL 14 最小允许的止损/止盈水平,单位为点 Dimka-novitsek 2010.10.11 15:12 #9028 当然,我问它10分,20分,30分,50分。 [删除] 2010.10.11 15:16 #9029 Dimka-novitsek: 而这是什么???? 你有:ticket=OrderSend(Symbol(),OP_BUY,Lots,Bid,3,Ask-stoploss*Point,Bid+TakeProfit*Point, "macd sample",16384,0,Green)。 我们需要: ticket=OrderSend(Symbol(),OP_BUY,Lots,Ask,3,Bid-stoploss*Point,Ask+TakeProfit*Point, "macd sample",16384,0,Green)。 并在此更改: ticket=OrderSend(Symbol(),OP_SELL,Lots,Bid,3,Ask+stoploss*Point,Bid-TakeProfit*Point, "macd sample",16384,0,Red)。 Dimka-novitsek 2010.10.11 15:19 #9030 谢谢你!!!。哇,这太搞笑了! 1...896897898899900901902903904905906907908909910...1145 新评论 您错过了交易机会: 免费交易应用程序 8,000+信号可供复制 探索金融市场的经济新闻 注册 登录 拉丁字符(不带空格) 密码将被发送至该邮箱 发生错误 使用 Google 登录 您同意网站政策和使用条款 如果您没有帐号,请注册 可以使用cookies登录MQL5.com网站。 请在您的浏览器中启用必要的设置,否则您将无法登录。 忘记您的登录名/密码? 使用 Google 登录
我已经学会了如何插入Alert(GetLastError());我已经成功地纠正了错误,但我无法应对错误130!!!!。错误是错误的停止。
问价-止损*点在买入订单中,这里我从底价中扣除了止损乘以点,这就给出了下跌的点数。
在卖出订单的情况下,情况正好相反--出价+止损*点。一切都非常正确,正确的!!!!!!!!。
Stoploss在功能中的位置,我从后面和前面都数过了!我试过不同的尺寸!
I'm in STUPIDS!!!!!
帮助我!!!!!!!!!!
//| 迪蒙的边界.mq4 ||
//| Copyright © 2010, MetaQuotes Software Corp.
//| http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright"Copyright © 2010, MetaQuotes Software Corp.
#属性链接 "http://www.metaquotes.net"
//+------------------------------------------------------------------+
//|专家初始化功能 |
//+------------------------------------------------------------------+
Extern int BandsPeriod=20,i=1 ;extern int BandsShift=0;
外置双倍BandsDeviations=2.0。
extern double Lots=0.1,TakeProfit=50,stoploss=10。
int init()
{
//----
//----
return(0);
}
//+------------------------------------------------------------------+
//|专家去初始化功能|
//+------------------------------------------------------------------+
int deinit()
{
//----
//----
return(0);
}
//+------------------------------------------------------------------+
//|专家启动功能|
//+------------------------------------------------------------------+
int start()
{double Average,Verhnyayaghranytsa,Nyzhnyayaghranytsa,newres,sum,deviation;
string text; int ticket; int err;
text="MACD样本"。
Average=iMA(NULL,0,BandsPeriod,BandsShift,MODE_SMA,PRICE_CLOSE,i)。
//----
newres=Close[i]-Average。
sum=newres*newres。
偏差=BandsDeviations*MathSqrt(sum/BandsPeriod)。
Verhnyayaghranytsa=平均值+偏差。
Nyzhnyayaghranytsa=平均数-偏差。
//----
如果(Verhnyayaghranytsa<Close[i])
{ Comment(" buoy!",Verhnyayaghranytsa ) 。
ticket=OrderSend(Symbol(,OP_BUY,Lots,Bid,3,Ask-stoploss*Point,Bid+TakeProfit*Point, "macd sample",16384,0,Green);
}
如果(Nyzhnyayaghranytsa>Close[i])
{ Comment(" sell!",Nyzhnyayaghranytsa ) 。
ticket=OrderSend(Symbol(,OP_SELL,Lots,Ask,3,Bid+stoploss*Point,Ask-TakeProfit*Point, "macd sample",16384,0,Red);
警告(GetLastError())。
}
return(0);
}
//+------------------------------------------------------------------+
一般来说,我以任何方式改变问价和出价,但仍然是一样的--130!
而且你还应该检查StopLevel。
非常感谢你,90%的人都有帮助--仍然有零,但它们一般不会干扰,也不会与指标!!!!。
这是什么????
返回有关市场观察中所列金融工具的各种信息。当前金融工具的一些信息被储存在预定义的变量 中。
而这是什么????
你有:ticket=OrderSend(Symbol(),OP_BUY,Lots,Bid,3,Ask-stoploss*Point,Bid+TakeProfit*Point, "macd sample",16384,0,Green)。
我们需要: ticket=OrderSend(Symbol(),OP_BUY,Lots,Ask,3,Bid-stoploss*Point,Ask+TakeProfit*Point, "macd sample",16384,0,Green)。
并在此更改: ticket=OrderSend(Symbol(),OP_SELL,Lots,Bid,3,Ask+stoploss*Point,Bid-TakeProfit*Point, "macd sample",16384,0,Red)。