脚本: 建立卖出仓位的脚本

 

建立卖出仓位的脚本:

这些脚本用于在当前价位水平上建立卖出仓位并固定止损和获利点数

作者: Nikolay Kositsin

 

当以下代码中的 SYMBOL_TRADE_STOPS_LEVEL=0 时,OpenBuyPosition 脚本会出现错误:

bool StopCorrect(string symbol,int &Stop)
  {
//----
   int Extrem_Stop=int(SymbolInfoInteger(symbol,SYMBOL_TRADE_STOPS_LEVEL));
   if(!Extrem_Stop) return(false);   MUST BE    if(Extrem_Stop<0) return(false);
   if(Stop<Extrem_Stop) Stop=Extrem_Stop;
//----
   return(true);
  }
Extrem_Stop 是一个 int,而不是 bool。
 
有些资产无法与 4 个 EA 中的任何一个配合使用,有人知道如何纠正这种情况吗?
 
可惜没有时间下订单 ((((