我将免费撰写一份顾问报告 - 页 112

 
祝大家身体健康!从论坛上对我提出的是否有可能根据图表中存在的通常指标的彩色线条制作猫头鹰的问题的反馈来看,从反馈中可以看出--这是可能的。例如,绿色的与蓝色的相交,蓝色的与红色的相交,等等。而当这些条件相吻合时,就会在适当的方向上下单。究竟为什么要按线?因为这样的专家顾问对于一个初学的交易员来说 是一个很好的助手,他要做很多实验,检查很多理论,而且是一个真正有价值的时间和节省神经的专家顾问。为什么我的信息在这里,在免费的EA部分?因为它肯定是有用的,即使不是对所有人,也是对许多人。我附上一张截图,以便更好地理解我所谈论的内容。
附加的文件:
o9b4dq-1.jpg  73 kb
 
你好。有什么办法可以使外汇学院SniperX策略自动化吗?
 
大家好,能否推荐一些类似的东西 --e-CloseByProfit-- EA将在所有头寸达到预定的总利润或亏损水平时平仓 -- 仅在MT5上谢谢你。
 

你好。如果您有时间,能否帮助我? 问题是这样的,我需要EA在两个指标的每个信号上开一个订单,(当它们处于某种组合时,它们会给出一个信号)总之,应该有几个订单,根据指标的信号在市场上买入 或卖出。但我在市场上只有一个订单,在它关闭之前,下一个订单没有打开......,这是订单计数的问题吗?请给我一个提示。如果你需要,我可以把代码发给你。

事先非常感谢!

 
danil77783:

你好。如果你有时间的话,可以帮助我吗? 问题是这样的,我需要EA在两个指标的每个信号上开一个订单,(当它们处于某种组合时,它们会给出一个信号)总之,市场上应该有几个订单, 根据指标的信号,相应地买入 或卖出。但我在市场上只有一个订单,在它关闭之前,下一个订单没有打开......,这是一个计算订单的问题吗?请给我一个提示。如果你需要它,我可以把代码发给你。

提前感谢!

好吧,除非你开始了解编程,否则你无法在没有代码的情况下修复你的EA。最有可能的是,你的EA是以市场上的1个订单为模板编写的,实际上很难纠正,因为以多个订单和不同的标准来工作是非常不同的。

 
Pawel Egoshin:
你需要的是一个EA,一个普通的马汀,间距增加。

难道伊兰就没有一个单一的选择吗?事实上,有非常多这样的梅花鹿就在开源中,但你可能需要在盘子上呈现...

 
Sergey Martynov:

当然,很多时间已经过去了,但快速浏览代码后发现,我必须根据策略重新编写机器人--因为这么多次调用指标是没有意义的,因为在调用中已经给出了后续的比较结果,除非是为小数点前4位的工具计算。

 
yuriy kovalchuk:
你好,你能不能推荐一些类似的东西---e-CloseByProfit---EA将在达到预定的总利润或损失时关闭所有的头寸---仅在MT5上谢谢你。

类似这样的事情。你只需要输入你的余额+你想获得的利润

//+------------------------------------------------------------------+
//|                                                  CloseEquity.mq5 |
//|                        Copyright 2020, MetaQuotes Software Corp. |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2020, MetaQuotes Software Corp."
#property link      "https://www.mql5.com"
#property version   "1.00"

//+------------------------------------------------------------------+
//|                                          Close all if a loss.mq5 |
//|                              Copyright © 2020, Vladimir Karputov |
//|                     https://www.mql5.com/ru/market/product/43516 |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2020, Vladimir Karputov"
#property link      "https://www.mql5.com/ru/market/product/43516"
#property version   "1.000"
/*
   barabashkakvn Trading engine 3.112
*/
#include <Trade\Trade.mqh>
#include <Trade\AccountInfo.mqh>
//---
CPositionInfo  m_position;                   // object of CPositionInfo class
CTrade         m_trade;                      // object of CTrade class
CAccountInfo   m_account;                    // object of CAccountInfo class
//--- input parameters
input double   InpProfit            = 150000;      // Profit Equity, in money
input bool     InpPrintLog          = false;       // Print log
input ulong    InpMagic             = 42967428;    // Magic number
//---
bool     m_stop                     = false;
int      ticks_to_close             = 1;           // количество тиков до снятия эксперта
//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit()
  {
//---
   m_trade.SetExpertMagicNumber(InpMagic);
   m_trade.SetMarginMode();
   m_trade.SetTypeFillingBySymbol(Symbol());
//---
   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//| Expert deinitialization function                                 |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
  {
//---

  }
//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick()
  {
   if(AccountInfoDouble(ACCOUNT_EQUITY)>InpProfit)
     {
      if(IsPositionExists())
        {
         CloseAllPositions();
         return;
        }
      else
        {
         Alert("It is necessary to restart the adviser");
         ExpertRemoves();
         m_stop=true;
        }
     }
   if(m_stop)
      return;
//---
  }
//+------------------------------------------------------------------+
//| Is position exists                                               |
//+------------------------------------------------------------------+
bool IsPositionExists(void)
  {
   for(int i=PositionsTotal()-1; i>=0; i--)
      if(m_position.SelectByIndex(i)) // selects the position by index for further access to its properties
         return(true);
//---
   return(false);
  }
//+------------------------------------------------------------------+
//| Close all positions                                              |
//+------------------------------------------------------------------+
void CloseAllPositions(void)
  {
   for(int i=PositionsTotal()-1; i>=0; i--) // returns the number of current positions
      if(m_position.SelectByIndex(i)) // selects the position by index for further access to its properties
         if(!m_trade.PositionClose(m_position.Ticket())) // close a position by the specified m_symbol
            if(InpPrintLog)
               Print(__FILE__," ",__FUNCTION__,", ERROR: ","CTrade.PositionClose ",m_position.Ticket());
  }
//+------------------------------------------------------------------+
//| start function                                                   |
//+------------------------------------------------------------------+
void ExpertRemoves(void)
  {
   static int tick_counter=0;
//---
   tick_counter++;
   Comment("\nДо выгрузки эксперта ",__FILE__," осталось ",
           (ticks_to_close-tick_counter)," тиков ");
//--- до
   if(tick_counter>=ticks_to_close)
     {
      ExpertRemove();
      Print(TimeCurrent(),": ",__FUNCTION__," эксперт будет выгружен");
     }
   Print("tick_counter = ",tick_counter);
//---
  }
//+------------------------------------------------------------------+
附加的文件:
CloseEquity.mq5  10 kb
 
Alexsandr San:

类似这样的事情。你只需要把你的资产负债表+你想做的任何事情。


不,那是更可靠的。

//+------------------------------------------------------------------+
//|                                                  CloseEquity.mq5 |
//|                        Copyright 2020, MetaQuotes Software Corp. |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2020, MetaQuotes Software Corp."
#property link      "https://www.mql5.com"
#property version   "1.00"

//+------------------------------------------------------------------+
//|                                          Close all if a loss.mq5 |
//|                              Copyright © 2020, Vladimir Karputov |
//|                     https://www.mql5.com/ru/market/product/43516 |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2020, Vladimir Karputov"
#property link      "https://www.mql5.com/ru/market/product/43516"
#property version   "1.000"
/*
   barabashkakvn Trading engine 3.112
*/
#include <Trade\Trade.mqh>
#include <Trade\AccountInfo.mqh>
//---
CPositionInfo  m_position;                   // object of CPositionInfo class
CTrade         m_trade;                      // object of CTrade class
CAccountInfo   m_account;                    // object of CAccountInfo class
//--- input parameters
input string   Template             = "ADX";       // Имя шаблона(without '.tpl')
input double   InpProfit            = 150000;      // Profit Equity, in money
input bool     InpPrintLog          = false;       // Print log
input ulong    InpMagic             = 42967428;    // Magic number
//---
bool     m_stop                     = false;
int      ticks_to_close             = 1;           // количество тиков до снятия эксперта
uint     SLEEPTIME                  = 1;           // Время паузы между повторами в секундах
ENUM_TIMEFRAMES TimeFrame;                         // Change TimeFrame - Current = dont changed
//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit()
  {
//---
   m_trade.SetExpertMagicNumber(InpMagic);
   m_trade.SetMarginMode();
   m_trade.SetTypeFillingBySymbol(Symbol());
//---
   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//| Expert deinitialization function                                 |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
  {
//---

  }
//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick()
  {
   if(AccountInfoDouble(ACCOUNT_EQUITY)>InpProfit)
     {
      if(IsPositionExists())
        {
         CloseAllPositions();
         Sleep(SLEEPTIME*1000);
         CloseAllPositions();
         return;
        }
      else
        {
         Alert("It is necessary to restart the adviser");
         ExpertRemoves();
         DeleteChart();
         m_stop=true;
        }
     }
   if(m_stop)
      return;
//---
  }
//+------------------------------------------------------------------+
//| Is position exists                                               |
//+------------------------------------------------------------------+
bool IsPositionExists(void)
  {
   for(int i=PositionsTotal()-1; i>=0; i--)
      if(m_position.SelectByIndex(i)) // selects the position by index for further access to its properties
         return(true);
//---
   return(false);
  }
//+------------------------------------------------------------------+
//| Close all positions                                              |
//+------------------------------------------------------------------+
void CloseAllPositions(void)
  {
   for(int i=PositionsTotal()-1; i>=0; i--) // returns the number of current positions
      if(m_position.SelectByIndex(i)) // selects the position by index for further access to its properties
         if(!m_trade.PositionClose(m_position.Ticket())) // close a position by the specified m_symbol
            if(InpPrintLog)
               Print(__FILE__," ",__FUNCTION__,", ERROR: ","CTrade.PositionClose ",m_position.Ticket());
  }
//+------------------------------------------------------------------+
//| start function                                                   |
//+------------------------------------------------------------------+
void ExpertRemoves(void)
  {
   static int tick_counter=0;
//---
   tick_counter++;
   Comment("\nДо выгрузки эксперта ",__FILE__," осталось ",
           (ticks_to_close-tick_counter)," тиков ");
//--- до
   if(tick_counter>=ticks_to_close)
     {
      ExpertRemove();
      Print(TimeCurrent(),": ",__FUNCTION__," эксперт будет выгружен");
     }
   Print("tick_counter = ",tick_counter);
//---
  }
//+------------------------------------------------------------------+
//| start function                                                   |
//+------------------------------------------------------------------+
void DeleteChart(void)
  {
   long currChart,prevChart=ChartFirst();
   int i=0,limit=100;
   bool errTemplate;
   while(i<limit)
     {
      currChart=ChartNext(prevChart);
      if(TimeFrame!=PERIOD_CURRENT)
        {
         ChartSetSymbolPeriod(prevChart,ChartSymbol(prevChart),TimeFrame);
        }
      errTemplate=ChartApplyTemplate(prevChart,Template+".tpl");
      if(!errTemplate)
        {
         Print("Error ",ChartSymbol(prevChart),"-> ",GetLastError());
        }
      if(currChart<0)
         break;
      Print(i,ChartSymbol(currChart)," ID =",currChart);
      prevChart=currChart;
      i++;
     }
  }
//+------------------------------------------------------------------+
附加的文件:
 

不,那是更可靠的。


谢谢你