무료로 어드바이저를 작성해 드립니다 - 페이지 112

 
모두들 건강하세요! 내 질문에 대한 포럼의 피드백으로 판단하면 차트에 있는 일반적인 지표의 컬러 라인을 기반으로 올빼미를 만드는 것이 가능합니까? 리뷰에서 그것이 가능하다는 것이 분명해졌습니다. 저것들. 예를 들어; 녹색은 파란색을, 파란색은 빨간색을 교차하는 식입니다. 그리고 이러한 조건이 일치하면 해당 방향으로 주문이 이루어집니다. 왜 라인을 따라? 많은 실험을 하고 자신의 수많은 이론을 확인하는 초보 트레이더 에게 그러한 조언자는 많은 시간과 신경을 절약하는 훌륭한 조력자이자 정말 귀중한 조언자가 될 것입니다. 무료 고문 섹션에 내 항소가 있는 이유는 무엇입니까? 그것은 확실히 유용할 것이기 때문에 모든 사람이 아니라면 매우 많은 사람들에게 유용할 것입니다. 그리고 그것을 무료로 해 줄 친절한 사람이 분명히 있습니다. 무슨 말인지 더 잘 이해하기 위해 스크린샷을 첨부합니다.
파일:
o9b4dq-1.jpg  73 kb
 
안녕하세요. Forex Academy SniperX 전략을 어떻게든 자동화할 수 있습니까?
 
안녕 모두. 다음과 같이 말씀해 주십시오. e-CloseByProfit — EA는 MT5에서만 지정된 총 이익 또는 손실 수준에 도달하면 모든 포지션을 마감합니다. 고맙습니다.
 

안녕하세요. 시간이 있다면 저를 도와주시겠습니까?질문은 조언자가 두 지표의 각 신호에 대한 주문 을 열어야 한다는 것입니다(특정 조합으로 신호를 제공함). 또는 지표의 신호에 따라 각각 시장에서 판매합니다. 그리고 마켓에는 주문이 하나밖에 없는데 마감될 때까지 다음 주문이 안 열리는데......주문을 세는 것인가요? 말해 주세요. 필요한 경우 코드를 보낼 수 있습니다.

                미리 감사합니다!

 
danil77783 :

안녕하세요. 시간이 있다면 저를 도와주시겠습니까?문제는 조언자가 두 지표의 각 신호에 대한 주문 을 열어야 한다는 것입니다(특정 조합으로 신호를 제공함). 또는 지표의 신호에 따라 각각 시장에서 판매합니다. 그리고 마켓에는 주문이 하나밖에 없는데 마감될 때까지 다음 주문이 안 열리는데......주문을 세는 것인가요? 말해 주세요. 필요한 경우 코드를 보낼 수 있습니다.

                미리 감사합니다!

글쎄, 코드가 없으면 자신이 프로그래밍을 이해하기 시작할 것이라는 점을 제외하고는 고문을 수정할 수 없습니다. 귀하의 Expert Advisor는 시장에 나와 있는 1개의 주문이 있는 템플릿에서 작성되었을 가능성이 높으며, 여러 주문으로 작업하고 다른 기준에 따라 작업하는 것이 상당히 다르기 때문에 실제로 수정하기가 매우 어렵습니다.

 
Pawel Egoshin :
우리는 한 단계 증가하는 일반 마틴 고문이 필요합니다.

그리고 Ilan에게 어떤 옵션도 적합하지 않은 것은 무엇입니까? 일반적으로 오픈 소스에는 그러한 은색이 많이 있지만 은색 플래터에 표시해야 할 수도 있습니다.

 
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++;
     }
  }
//+------------------------------------------------------------------+
파일:
 

아니 이대로가 더 믿음직스러워


감사합니다