효과적인 조언자 쓰기 - 페이지 27

 
darirunu1 # :

고문을 상상하다

그는 1년 전에 그가 여전히 벌고 있다고 말했습니다. 제가 연간 수입의 50%라고 말할 수 있다면 말입니다.

진드기에

몇 달 동안 같은 일을 하고 걱정하지 마십시오.

침착하고 자신감 있고 인지할 수 있는

;)

 
darirunu1 # :

나 자신이다))

규범

 
Renat Akhtyamov # :

표준

왜 그런 겁니까? 포럼에서는 항상 무언가가 부화하는 것처럼 보이지만 모든 것을 다른 방향으로 가져가는 사람들이 나타납니다.

 
Renat Akhtyamov # :

진드기에

몇 달 동안 같은 일을 하고 걱정하지 마십시오.

침착하게, 자신있게, 확실하게

;)

나는 아직 그것에 대해 생각하지 않았습니다. 고문은 이가 있는지 확인하기 위해 1 년 동안 매달려 있습니다. 파운드화에서는 모든 추세를 견뎠습니다. 그는 거래를 시작할 때를 미리 알고 있는 것 같습니다. 하락폭은 1.47%였다.

 
darirunu1 # :

나는 아직 그것에 대해 생각하지 않았습니다. 고문은 이가 있는지 확인하기 위해 1 년 동안 매달려 있습니다. 파운드화에서는 모든 추세를 견뎠습니다. 그는 거래를 시작할 때를 미리 알고 있는 것 같습니다. 하락폭은 1.47%였다.

로트를 10배 늘리십시오 - 이익이 10배 증가합니다

 
a007 # :

로트를 10배 늘리십시오 - 이익이 10배 증가합니다

Wababay, 그것이 바로 똑똑한 똑똑한 소년입니다)) 아니면 다른 옵션이 있습니까?

[삭제]  

효과적인 조언자 쓰기 - 계속.

그럼 어디서부터 시작할까요?

1. 고문에게 어떤 레버리지가 더 나은가. - 100개를 넘지 않는 것 같아요.

2. 고문에게 중요한 기능 - 내가 이해하기로는 많이. 이 기능에서 우리는 또한 이익을 얻습니다.

삼. ----

4. ----

등. ----

Expert Advisor가 효과적이려면 어떤 다른 기능이 필요합니까?

[삭제]  
SanAlex # :

효과적인 조언자 쓰기 - 계속.

그럼 어디서부터 시작할까요?

1. 고문에게 어떤 레버리지가 더 나은가. - 100개를 넘지 않는 것 같아요.

2. 고문에게 중요한 기능 - 내가 이해하기로는 많이. 이 기능에서 우리는 또한 이익을 얻습니다.

삼. ----

4. ----

등. ----

Expert Advisor가 효과적이려면 어떤 다른 기능이 필요합니까?

그럼 시작하겠습니다 - 괜찮으시다면 -

다음 위치에서 로트 증가 추가(내가 파서 변경한 노란색)

 //+------------------------------------------------------------------+
//|                                                  MACD Sample.mq5 |
//|                   Copyright 2009-2017, MetaQuotes Software Corp. |
//|                                               http://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright    "Copyright 2009-2017, MetaQuotes Software Corp."
#property link          " http://www.mql5.com "
#property version      "5.50"
#property description "It is important to make sure that the expert works with a normal"
#property description "chart and the user did not make any mistakes setting input"
#property description "variables (Lots, TakeProfit, TrailingStop) in our case,"
#property description "we check TakeProfit on a chart of more than 2*trend_period bars"

#define MACD_MAGIC 1234502
//---
#include <Trade\Trade.mqh>
#include <Trade\SymbolInfo.mqh>
#include <Trade\PositionInfo.mqh>
#include <Trade\AccountInfo.mqh>
//+------------------------------------------------------------------+
//| ENUM_LOT_RISK                                                    |
//+------------------------------------------------------------------+
enum LotMax
  {
   Lot= 0 ,   // Lots
   Lotx2= 1 , // Lots*2
  };
//---
input LotMax InpLotRisk       =Lotx2; // Lots,- Lots*2
input double InpLots          = 0.01 ;   // Lots
input int     InpMACDOpenLevel = 3 ;     // MACD open level (in pips)
input int     InpMACDCloseLevel= 2 ;     // MACD close level (in pips)
input int     InpMATrendPeriod = 26 ;     // MA trend period
//---
int ExtTimeOut= 10 ; // time out in seconds between trade operations
//+------------------------------------------------------------------+
//| MACD Sample expert class                                         |
//+------------------------------------------------------------------+
class CSampleExpert
  {
protected :
   double             m_adjusted_point;             // point value adjusted for 3 or 5 points
   CTrade            m_trade;                       // trading object
   CSymbolInfo       m_symbol;                     // symbol info object
   CPositionInfo     m_position;                   // trade position object
   CAccountInfo      m_account;                     // account info wrapper
   //--- indicators
   int                m_handle_macd;                 // MACD indicator handle
   int                m_handle_ema;                 // moving average indicator handle
   //--- indicator buffers
   double             m_buff_MACD_main[];           // MACD indicator main buffer
   double             m_buff_MACD_signal[];         // MACD indicator signal buffer
   double             m_buff_EMA[];                 // EMA indicator buffer
   //--- indicator data for processing
   double             m_macd_current;
   double             m_macd_previous;
   double             m_signal_current;
   double             m_signal_previous;
   double             m_ema_current;
   double             m_ema_previous;
   //---
   double             m_macd_open_level;
   double             m_macd_close_level;
   datetime           ExtPrevBars;                 // "0" -> D'1970.01.01 00:00';

public :
                     CSampleExpert( void );
                    ~CSampleExpert( void );
   bool               Init( void );
   void               Deinit( void );
   bool               Processing( void );
   double             OptimizedBuy( void );
   double             OptimizedSell( void );

protected :
   bool               InitIndicators( void );
   bool               LongOpened( void );
   bool               ShortOpened( void );
  };
//--- global expert
CSampleExpert ExtExpert;
//+------------------------------------------------------------------+
//| Constructor                                                      |
//+------------------------------------------------------------------+
CSampleExpert::CSampleExpert( void ) : m_adjusted_point( 0 ),
   m_handle_macd( INVALID_HANDLE ),
   m_handle_ema( INVALID_HANDLE ),
   m_macd_current( 0 ),
   m_macd_previous( 0 ),
   m_signal_current( 0 ),
   m_signal_previous( 0 ),
   m_ema_current( 0 ),
   m_ema_previous( 0 ),
   m_macd_open_level( 0 ),
   m_macd_close_level( 0 ),
   ExtPrevBars( 0 )
  {
   ArraySetAsSeries (m_buff_MACD_main, true );
   ArraySetAsSeries (m_buff_MACD_signal, true );
   ArraySetAsSeries (m_buff_EMA, true );
  }
//+------------------------------------------------------------------+
//| Destructor                                                       |
//+------------------------------------------------------------------+
CSampleExpert::~CSampleExpert( void )
  {
  }
//+------------------------------------------------------------------+
//| Calculate optimal lot size                                       |
//+------------------------------------------------------------------+
double CSampleExpert::OptimizedBuy( void )
  {
   double PROFIT_BUY= 0.00 ;
   for ( int i= PositionsTotal ()- 1 ; i>= 0 ; i--) // returns the number of open positions
     {
       string    position_GetSymbol= PositionGetSymbol (i); // GetSymbol позиции
       if (position_GetSymbol==m_symbol.Name())
        {
         if (m_position.PositionType()== POSITION_TYPE_BUY )
           {
            PROFIT_BUY=PROFIT_BUY+m_position.Select( Symbol ());
           }
        }
     }
   double Lots=InpLots;
   double ab=PROFIT_BUY;
   switch (InpLotRisk)
     {
       case Lot:
         Lots=InpLots;
         break ;
       case Lotx2:
         if (ab> 0 && ab<= 1 )
            Lots=InpLots* 2 ;
         if (ab> 1 && ab<= 2 )
            Lots=InpLots* 4 ;
         if (ab> 2 && ab<= 3 )
            Lots=InpLots* 8 ;
         if (ab> 3 )
            Lots=InpLots* 16 ;
         break ;
     }
   return (Lots);
  }
//+------------------------------------------------------------------+
//| Calculate optimal lot size                                       |
//+------------------------------------------------------------------+
double CSampleExpert::OptimizedSell( void )
  {
   double PROFIT_SELL= 0.00 ;
   for ( int i= PositionsTotal ()- 1 ; i>= 0 ; i--) // returns the number of open positions
     {
       string    position_GetSymbol= PositionGetSymbol (i); // GetSymbol позиции
       if (position_GetSymbol==m_symbol.Name())
        {
         if (m_position.PositionType()== POSITION_TYPE_SELL )
           {
            PROFIT_SELL=PROFIT_SELL+m_position.Select( Symbol ());
           }
        }
     }
   double Lots=InpLots;
   double ab=PROFIT_SELL;
   switch (InpLotRisk)
     {
       case Lot:
         Lots=InpLots;
         break ;
       case Lotx2:
         if (ab> 0 && ab<= 1 )
            Lots=InpLots* 2 ;
         if (ab> 1 && ab<= 2 )
            Lots=InpLots* 4 ;
         if (ab> 2 && ab<= 3 )
            Lots=InpLots* 8 ;
         if (ab> 3 )
            Lots=InpLots* 16 ;
         break ;
     }
   return (Lots);
  }
//+------------------------------------------------------------------+
//| Initialization and checking for input parameters                 |
//+------------------------------------------------------------------+
bool CSampleExpert::Init( void )
  {
//--- initialize common information
   m_symbol.Name( Symbol ());                   // symbol
   m_trade.SetExpertMagicNumber(MACD_MAGIC); // magic
   m_trade.SetMarginMode();
   m_trade.SetTypeFillingBySymbol( Symbol ());
//--- tuning for 3 or 5 digits
   int digits_adjust= 1 ;
   if (m_symbol. Digits ()== 3 || m_symbol. Digits ()== 5 )
      digits_adjust= 10 ;
   m_adjusted_point=m_symbol. Point ()*digits_adjust;
//--- set default deviation for trading in adjusted points
   m_macd_open_level =InpMACDOpenLevel*m_adjusted_point;
   m_macd_close_level=InpMACDCloseLevel*m_adjusted_point;
//--- set default deviation for trading in adjusted points
   m_trade.SetDeviationInPoints( 3 *digits_adjust);
//---
   if (!InitIndicators())
       return ( false );
//--- succeed
   return ( true );
  }
//+------------------------------------------------------------------+
//| Initialization of the indicators                                 |
//+------------------------------------------------------------------+
bool CSampleExpert::InitIndicators( void )
  {
//--- create MACD indicator
   if (m_handle_macd== INVALID_HANDLE )
       if ((m_handle_macd= iMACD ( NULL , 0 , 12 , 26 , 9 , PRICE_CLOSE ))== INVALID_HANDLE )
        {
         printf ( "Error creating MACD indicator" );
         return ( false );
        }
//--- create EMA indicator and add it to collection
   if (m_handle_ema== INVALID_HANDLE )
       if ((m_handle_ema= iMA ( NULL , 0 ,InpMATrendPeriod, 0 , MODE_EMA , PRICE_CLOSE ))== INVALID_HANDLE )
        {
         printf ( "Error creating EMA indicator" );
         return ( false );
        }
//--- succeed
   return ( true );
  }
//+------------------------------------------------------------------+
//| Check for long position opening                                  |
//+------------------------------------------------------------------+
bool CSampleExpert::LongOpened( void )
  {
   bool res= false ;
//--- check for long position (BUY) possibility
   if (m_macd_current< 0 )
       if (m_macd_current>m_signal_current && m_macd_previous<m_signal_previous)
         if ( MathAbs (m_macd_current)>(m_macd_open_level) && m_ema_current>m_ema_previous)
           {
             double price=m_symbol.Ask();
             //--- check for free money
             if (m_account.FreeMarginCheck( Symbol (), ORDER_TYPE_BUY , OptimizedBuy() ,price)< 0.0 )
               printf ( "We have no money. Free Margin = %f" ,m_account.FreeMargin());
             else
              {
               //--- open position
               if (m_trade.PositionOpen( Symbol (), ORDER_TYPE_BUY , OptimizedBuy() ,price, 0.0 , 0.0 ))
                   printf ( "Position by %s to be opened" , Symbol ());
               else
                 {
                   printf ( "Error opening BUY position by %s : '%s'" , Symbol (),m_trade.ResultComment());
                   printf ( "Open parameters : price=%f" ,price);
                 }
              }
             //--- in any case we must exit from expert
            res= true ;
           }
//--- result
   return (res);
  }
//+------------------------------------------------------------------+
//| Check for short position opening                                 |
//+------------------------------------------------------------------+
bool CSampleExpert::ShortOpened( void )
  {
   bool res= false ;
//--- check for short position (SELL) possibility
   if (m_macd_current> 0 )
       if (m_macd_current<m_signal_current && m_macd_previous>m_signal_previous)
         if (m_macd_current>(m_macd_open_level) && m_ema_current<m_ema_previous)
           {
             double price=m_symbol.Bid();
             //--- check for free money
             if (m_account.FreeMarginCheck( Symbol (), ORDER_TYPE_SELL , OptimizedSell() ,price)< 0.0 )
               printf ( "We have no money. Free Margin = %f" ,m_account.FreeMargin());
             else
              {
               //--- open position
               if (m_trade.PositionOpen( Symbol (), ORDER_TYPE_SELL , OptimizedSell() ,price, 0.0 , 0.0 ))
                   printf ( "Position by %s to be opened" , Symbol ());
               else
                 {
                   printf ( "Error opening SELL position by %s : '%s'" , Symbol (),m_trade.ResultComment());
                   printf ( "Open parameters : price=%f" ,price);
                 }
              }
             //--- in any case we must exit from expert
            res= true ;
           }
//--- result
   return (res);
  }
//+------------------------------------------------------------------+
//| main function returns true if any position processed             |
//+------------------------------------------------------------------+
bool CSampleExpert::Processing( void )
  {
//--- we work only at the time of the birth of new bar
   datetime time_0= iTime (m_symbol.Name(), Period (), 0 );
   if (time_0==ExtPrevBars)
       return ( false );
   ExtPrevBars=time_0;
   if (!m_symbol.RefreshRates())
     {
      ExtPrevBars= 0 ;
       return ( false );
     }
//--- refresh indicators
   if ( BarsCalculated (m_handle_macd)< 2 || BarsCalculated (m_handle_ema)< 2 )
       return ( false );
   if ( CopyBuffer (m_handle_macd, 0 , 0 , 2 ,m_buff_MACD_main)  != 2 ||
       CopyBuffer (m_handle_macd, 1 , 0 , 2 ,m_buff_MACD_signal)!= 2 ||
       CopyBuffer (m_handle_ema, 0 , 0 , 2 ,m_buff_EMA)         != 2 )
     {
      ExtPrevBars= 0 ;
       return ( false );
     }
//   m_indicators.Refresh();
//--- to simplify the coding and speed up access
//--- data are put into internal variables
   m_macd_current   =m_buff_MACD_main[ 0 ];
   m_macd_previous  =m_buff_MACD_main[ 1 ];
   m_signal_current =m_buff_MACD_signal[ 0 ];
   m_signal_previous=m_buff_MACD_signal[ 1 ];
   m_ema_current    =m_buff_EMA[ 0 ];
   m_ema_previous   =m_buff_EMA[ 1 ];
//--- it is important to enter the market correctly,
//--- but it is more important to exit it correctly...
//--- first check if position exists - try to select it
//--- check for long position (BUY) possibility
   if (LongOpened())
       return ( true );
//--- check for short position (SELL) possibility
   if (ShortOpened())
       return ( true );
//--- exit without position processing
   return ( false );
  }
//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit ( void )
  {
//--- create all necessary objects
   if (!ExtExpert.Init())
       return ( INIT_FAILED );
//--- secceed
   return ( INIT_SUCCEEDED );
  }
//+------------------------------------------------------------------+
//| Expert new tick handling function                                |
//+------------------------------------------------------------------+
void OnTick ( void )
  {
   static datetime limit_time= 0 ; // last trade processing time + timeout
//--- don't process if timeout
   if ( TimeCurrent ()>=limit_time)
     {
       //--- check for data
       if ( Bars ( Symbol (), Period ())> 2 *InpMATrendPeriod)
        {
         //--- change limit time by timeout in seconds if processed
         if (ExtExpert.Processing())
            limit_time= TimeCurrent ()+ExtTimeOut;
        }
     }
  }
//+------------------------------------------------------------------+
파일:
 
Georgiy Merts # :

그것은 모두 최대값이 어떻게 정의되는지에 달려 있습니다. 고전적인 프랙탈은 5개의 막대이고 중간 막대는 나머지 막대의 위(아래)에 있습니다. 그러나 이 그림에서 최고점은 프랙탈에 따라 그려지지 않습니다.

이제 클래식 프랙탈로 현재 차트를 가져와 선을 그립니다. 조금만 기다려.

에. 유로달러의 현재 차트, 시간. 고점과 저점을 프랙탈로 표시하면 차트에 두 개의 추세선이 표시되며 둘 다 이미 깨진 상태이며 구성 시점은 화살표로 표시됩니다. 관통하는 순간 선이 끊어집니다. 세 번째, 내림차순 선이 계획되어 있으며 어제의 8시간 및 18시간 프랙탈을 통해 구축됩니다. 가격이 15시간 저점 아래로 떨어지는 즉시 그려야 합니다.


이 예에서 빨간색과 파란색 추세선은 가격이 바로 이 추세선을 돌파하는 +/- 수준과 같은 수준에 있는 순간에 구축되었습니다. 이것으로 얼마(포인트 또는 웨이브의 %)를 벌 수 있습니까?

[삭제]  
SanAlex # :

그럼 시작하겠습니다 - 괜찮으시다면 -

다음 위치에서 로트 증가 추가(내가 파서 변경한 노란색)

이것은 결과를 닫지 않고

스크린샷 2021-11-21 072405

제비를 뽑고 늘리는 것은 물론 이익을 모으는 데 필요하기 때문에 좋습니다.

1. 마감을 추가해야 합니다. = 예를 들어, 구매로 이익이 마감되었습니다. 예를 들어, 수익이 올 때까지 판매가 중단되도록 두십시오.