초보자의 질문 MQL5 MT5 MetaTrader 5 - 페이지 1275

 
Aleksandr Egorov :

이미 읽었음)

저도 지금 봤습니다. 2011년 기사인데... 가장 중요한건 "모든 진드기" 모드에서 진드기가 어떻게 생성되는지에 대한 설명이 있다는 것입니다. 그리고 "실제 진드기 기반"은 그 자체로 말합니다. 이것이 차이점입니다.

 
테스터 질문입니다.

렌더 모드에서는 인쇄물이 표시되지 않습니다. 이것이 어떻게되어야합니까 아니면 내가 잘못하고 있습니까?
 
안녕하세요 여러분!!! 그리고 새해 복 많이 받으세요!!! 프로그래밍의 곡선은 나를 수업으로 이끌었습니다. 그리고 여기서 제가 오해를 하고 있습니다. #include/ChartObject 폴더에 내장 클래스가 있고 클래스 파일 -- ChartObjectsLines가 있으며 여기에는 추세선 클래스뿐만 아니라 이러한 모든 클래스에 대한 라인과 생성자가 있는 다른 클래스도 포함되어 있습니다. 그리고 여기에 내가 찾지 못한 실제 질문이 있습니다. 한 클래스에는 이러한 클래스에 대한 많은 클래스와 생성자가 있을 수 있습니다 ???
 
그리고 또 다른 질문)) 차트 창에서 X/Y 좌표로 가격과 날짜를 구하는 방법???
 
Kira27 :
그리고 또 다른 질문)) 차트 창에서 X/Y 좌표로 가격과 날짜를 구하는 방법???

https://www.mql5.com/ru/docs/chart_operations/charttimepricetoxy

https://www.mql5.com/ru/docs/chart_operations/chartxytotimeprice

Документация по MQL5: Операции с графиками / ChartTimePriceToXY
Документация по MQL5: Операции с графиками / ChartTimePriceToXY
  • www.mql5.com
ChartTimePriceToXY - Операции с графиками - Справочник MQL5 - Справочник по языку алгоритмического/автоматического трейдинга для MetaTrader 5
 
다른 질문이 있습니다)) 지침을 읽도록 저를 보내지 마세요. 한 번 이상 읽었지만 여전히 수업의 모든 내용을 이해하지 못합니다.) 다음은 Expert\에 있는 Parabolic SAR에 대한 후행 정지 클래스입니다. TrailingParabolicSAR.mqh라는 이름의 Trailing\ 폴더 상호 작용 방법이 어렵지 않은지 알려주세요. 예를 들어 더 잘 이해한다는 것입니다.))) 미리, 응답하는 사람들에게 감사합니다)
 //+------------------------------------------------------------------+
//|                                         TrailingParabolicSAR.mqh |
//|                   Copyright 2009-2013, MetaQuotes Software Corp. |
//|                                              http://www.mql5.com |
//+------------------------------------------------------------------+
#include <Expert\ExpertTrailing.mqh>
// wizard description start
//+------------------------------------------------------------------+
//| Description of the class                                         |
//| Title=Trailing Stop based on Parabolic SAR                       |
//| Type=Trailing                                                    |
//| Name=ParabolicSAR                                                |
//| Class=CTrailingPSAR                                              |
//| Page=                                                            |
//| Parameter=Step,double,0.02,Speed increment                       |
//| Parameter=Maximum,double,0.2,Maximum rate                        |
//+------------------------------------------------------------------+
// wizard description end
//+------------------------------------------------------------------+
//| Class CTrailingPSAR.                                             |
//| Appointment: Class traling stops with Parabolic SAR.             |
//| Derives from class CExpertTrailing.                              |
//+------------------------------------------------------------------+
class CTrailingPSAR : public CExpertTrailing
  {
protected :
   CiSAR             m_sar;             // object-indicator
   //--- adjusted parameters
   double             m_step;           // the "speed increment" parameter of the indicator
   double             m_maximum;         // the "maximum rate" parameter of the indicator

public :
                     CTrailingPSAR( void );
                    ~CTrailingPSAR( void );
   //--- methods of setting adjustable parameters
   void               Step( double step)       { m_step=step;       }
   void               Maximum( double maximum) { m_maximum=maximum; }
   //--- method of creating the indicator and timeseries
   virtual bool       InitIndicators(CIndicators *indicators);
   //---
   virtual bool       CheckTrailingStopLong(CPositionInfo *position, double &sl, double &tp);
   virtual bool       CheckTrailingStopShort(CPositionInfo *position, double &sl, double &tp);
  };
//+------------------------------------------------------------------+
//| Constructor                                                      |
//+------------------------------------------------------------------+
void CTrailingPSAR::CTrailingPSAR( void ) : m_step( 0.02 ),
                                          m_maximum( 0.2 )

  {
  }
//+------------------------------------------------------------------+
//| Destructor                                                       |
//+------------------------------------------------------------------+
void CTrailingPSAR::~CTrailingPSAR( void )
  {
  }
//+------------------------------------------------------------------+
//| Create indicators.                                               |
//+------------------------------------------------------------------+
bool CTrailingPSAR::InitIndicators(CIndicators *indicators)
  {
//--- check pointer
   if (indicators== NULL )
       return ( false );
//--- add object to collection
   if (!indicators.Add( GetPointer (m_sar)))
     {
       printf ( __FUNCTION__ + ": error adding object" );
       return ( false );
     }
//--- initialize object
   if (!m_sar.Create(m_symbol.Name(),m_period,m_step,m_maximum))
     {
       printf ( __FUNCTION__ + ": error initializing object" );
       return ( false );
     }
//--- ok
   return ( true );
  }
//+------------------------------------------------------------------+
//| Checking trailing stop and/or profit for long position.          |
//+------------------------------------------------------------------+
bool CTrailingPSAR::CheckTrailingStopLong(CPositionInfo *position, double &sl, double &tp)
  {
//--- check
   if (position== NULL )
       return ( false );
//---
   double level = NormalizeDouble (m_symbol.Bid()-m_symbol.StopsLevel()*m_symbol. Point (),m_symbol. Digits ());
   double new_sl= NormalizeDouble (m_sar.Main( 1 ),m_symbol. Digits ());
   double pos_sl=position.StopLoss();
   double base  =(pos_sl== 0.0 ) ? position.PriceOpen() : pos_sl;
//---
   sl= EMPTY_VALUE ;
   tp= EMPTY_VALUE ;
   if (new_sl>base && new_sl<level)
      sl=new_sl;
//---
   return (sl!= EMPTY_VALUE );
  }
//+------------------------------------------------------------------+
//| Checking trailing stop and/or profit for short position.         |
//+------------------------------------------------------------------+
bool CTrailingPSAR::CheckTrailingStopShort(CPositionInfo *position, double &sl, double &tp)
  {
//--- check
   if (position== NULL )
       return ( false );
//---
   double level = NormalizeDouble (m_symbol.Ask()+m_symbol.StopsLevel()*m_symbol. Point (),m_symbol. Digits ());
   double new_sl= NormalizeDouble (m_sar.Main( 1 )+m_symbol.Spread()*m_symbol. Point (),m_symbol. Digits ());
   double pos_sl=position.StopLoss();
   double base  =(pos_sl== 0.0 ) ? position.PriceOpen() : pos_sl;
//---
   sl= EMPTY_VALUE ;
   tp= EMPTY_VALUE ;
   if (new_sl<base && new_sl>level)
      sl=new_sl;
//---
   return (sl!= EMPTY_VALUE );
  }
//+------------------------------------------------------------------+
 
Kira27 :
다른 질문이 있습니다)) 지침을 읽도록 저를 보내지 마세요. 한 번 이상 읽었지만 여전히 수업의 모든 내용을 이해하지 못합니다.) 다음은 Expert\에 있는 Parabolic SAR에 대한 후행 정지 클래스입니다. TrailingParabolicSAR.mqh라는 이름의 Trailing\ 폴더 상호 작용 방법이 어렵지 않은지 알려주세요. 예를 들어 더 잘 이해한다는 것입니다.))) 미리, 응답하는 사람들에게 감사합니다)

사용 예는 [dta 폴더]\MQL5\Experts\Advisors\ExpertMAPSAR.mq5에 나와 있습니다.

 
Vladimir Karputov :

사용 예는 [dta 폴더]\MQL5\Experts\Advisors\ExpertMAPSAR.mq5에 나와 있습니다.

감사해요!!!

 
User_mt5 :
테스터 질문입니다.

이미징 모드에서는 인쇄물이 표시되지 않습니다. 이것이 어떻게되어야합니까 아니면 내가 잘못하고 있습니까?
아마 아무도 모릅니다.
사유: