任何菜鸟问题,为了不给论坛添乱。专业人士,不要路过。没有你就无处可去 - 6. - 页 90

 
artmedia70:

还没有找过错误--有很多事情要做。

要关闭红叉所在的Sell,你需要在当前条形上检查。如果Ask<=close level &&Open[0]>close level


有些东西根本不起作用 A卖出交易的代码 if(Ask<=PriceLow &&Open[0]>PriceLow) OrderClose(OrderTicket(),OrderLots(),Ask,3,White); 根本没有关闭。


如果对这个话题感兴趣,可以加急联系我skype alexey1979621

 
alexey1979621:

有些东西不工作 OrderClose(OrderTicket(),OrderLots(),Ask,3,White); 不关闭 如果(Ask<=PriceLow &&Open[0]>PriceLow); 完全不关闭。


如果对该主题感兴趣,可与我进行快速沟通,skype alexey1979621


 if(Ask<=PriceLow && High[1]>PriceLow) OrderClose(OrderTicket(),OrderLots(),Ask,3,White);
 
artmedia70:


这并不奏效。也许这个东西如果(Volume[0]>1)返回。
 
alexey1979621:

开盘价 测试?

这都是关于虱子的问题

 
对所有蜱虫进行检测
artmedia70:

按开盘价测试?

这都是关于虱子的问题


对所有蜱虫进行检测
 
alexey1979621:
对所有蜱虫进行测试 对所有蜱虫进行测试

卖出收盘时的指标线 在哪里?

 
alexey1979621:

纠正了,关闭交易的方式和上面的截图一样,但我需要在红叉的地方关闭。

我同意ExtremeTMA是过度的,但我想这并不影响寻找进入点,这里主要的是过滤器。我使用了TDI指标。我附上了我做的东西(我的手艺不好,所以这个EA要好好处理)。我只有一个问题,在测试器中,1年大约需要5个小时(我在某个地方犯了一个错误)。如果检查错误并不困难。

尝试用以下方式开单。

int CalculateCurrentOrders(string symbol)
  {
   int buys=0,sells=0;
   //----
   if (OrdersTotal()>0)
   {  for (int i=OrdersTotal()-1; i>=0; i--)
      {  if (OrderSelect(i,SELECT_BY_POS,MODE_TRADES))
         {  if (OrderSymbol()!=Symbol())   continue;
            if (OrderMagicNumber()!=Magic) continue;
            {  if(OrderType()==OP_BUY)  buys++;
               if(OrderType()==OP_SELL) sells++;
            }
   }  }  }
   //---- return orders volume
   if(buys>0) return(buys);
   else       return(-sells);
  }

引起我注意的是,你设置了Magic=124,但代码马上就说是124。与Slippage相同,OrderSend 和OrderClose有3(三)。

 
alexey1979621:

已纠正,关闭交易的方式与上述截图相同,但红叉应该在那里。

我同意ExtremeTMA是过度的,但我想这并不影响寻找进入点,这里主要的是过滤器。我使用了TDI指标。我附上了提示(我马上告诉你,我的手不直,所以我的专家顾问项目就像我的手一样)。我只有一个问题,在测试器中,1年大约需要5个小时(我在某个地方犯了一个错误)。如果你不介意寻找错误。

有可能是因为自定义指标的计算量太大,EA的速度在下降。如果你想检查计算的严重性,在你交易的图表上做以下脚本。如果长时间没有评论,那么将N减少到100000甚至更少。看看每次迭代需要多少毫秒。

//---
int    N=1000000;
//---
double PriceHigh, PriceLow, TDIHigh, TDILow, RSIPriceLine, TradeSignalLine;
int    timestart, timestop;
//---
string TimeFrame         = "current time frame";
int    HalfLength        = 56;
int    Price             = PRICE_CLOSE;
double ATRMultiplier     = 2.0;
int    ATRPeriod         = 100;
bool   Interpolate       = true;
double TrendThreshold    = 0.5;
bool   Distances         = false;
//---
int RSI_Period           = 13;         //8-25
int RSI_Price            = MODE_CLOSE;           //0-6
int Volatility_Band      = 34;    //20-40
int RSI_Price_Line       = 2;      
int RSI_Price_Type       = MODE_SMA;      //0-3
int Trade_Signal_Line    = 7;   
int Trade_Signal_Type    = MODE_SMA;   //0-3
bool UseAlerts           = false;
//===============================================
int start()
{
   timestart=GetTickCount();
   for (int i=0;i<N;i++) 
   {  
   PriceHigh = iCustom (Symbol(), 0, "ExtremeTMALine", TimeFrame, HalfLength , Price, 
                        ATRMultiplier, ATRPeriod, Interpolate, TrendThreshold, Distances, 1, 0);
   PriceLow = iCustom (Symbol(), 0, "ExtremeTMALine", TimeFrame, HalfLength , Price, 
                       ATRMultiplier, ATRPeriod, Interpolate, TrendThreshold, Distances, 2, 0);
   TDIHigh = iCustom (Symbol(), 0, "TradersDynamicIndex", RSI_Period, RSI_Price, Volatility_Band, 
                      RSI_Price_Line, RSI_Price_Type, Trade_Signal_Line, Trade_Signal_Type, UseAlerts, 1, 0);
   TDILow = iCustom (Symbol(), 0, "TradersDynamicIndex", RSI_Period, RSI_Price, Volatility_Band, 
                     RSI_Price_Line, RSI_Price_Type, Trade_Signal_Line, Trade_Signal_Type,UseAlerts, 3, 0);
   RSIPriceLine = iCustom (Symbol(), 0, "TradersDynamicIndex", RSI_Period, RSI_Price, Volatility_Band, 
                           RSI_Price_Line, RSI_Price_Type, Trade_Signal_Line, Trade_Signal_Type,UseAlerts, 4, 0);
   TradeSignalLine = iCustom (Symbol(), 0, "TradersDynamicIndex", RSI_Period, RSI_Price, Volatility_Band, 
                              RSI_Price_Line, RSI_Price_Type, Trade_Signal_Line, Trade_Signal_Type,UseAlerts, 5, 0);
   }
   timestop=GetTickCount();
   //---
   Comment(" Calculation ",N," times was =  ",timestop-timestart," millisec \n",
           " One iteration was = ",(timestop-timestart)/(N-1)," millisec");
   return(0);
}
//---
附加的文件:
testing_1.zip  4 kb
 
artmedia70:

而在卖出的收盘时,指标线在哪里?

一切都和截图上的一样。该通道没有时间重新绘制。
 
paladin80,你的脚本使我的电脑关闭了两次!