[警告关闭!]任何新手问题,为了不给论坛添乱。专业人士,不要走过。没有你,哪里都不能去。 - 页 903

 

我已经学会了如何插入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!
 
Dimka-novitsek:
一般来说,我以任何方式改变问价和出价,但仍然是一样的--130!

而且你还应该检查StopLevel。
 
这是什么????
 
Vinin:
 IndicatorShortName("");
   SetIndexLabel(0, "");
   SetIndexLabel(1, "");
   SetIndexLabel(5, "");
   SetIndexLabel(6, "");

非常感谢你,90%的人都有帮助--仍然有零,但它们一般不会干扰,也不会与指标!!!!。


 
Dimka-novitsek:
这是什么????

doubleMarketInfo( 字符串, int 类型)

返回有关市场观察中所列金融工具的各种信息。当前金融工具的一些信息被储存在预定义的变量 中。

MODE_STOPLEVEL 14 最小允许的止损/止盈水平,单位为点

 
当然,我问它10分,20分,30分,50分。
 
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)。

 
谢谢你!!!。哇,这太搞笑了!
原因: