우리는 무료 고문을 작성합니다 - 페이지 13

 
SanAlex :

결과: 표시기 "앞뒤로 ADX" 3월 4월 - 어떤 이유로 성공하지 못함

\\\\\\\\\\\\\\\\\\\\\\\\\\\\

여기 지표가 있습니다

여기에 더 나은 결과가 있습니다. 다른 필터(MA 및 RSI)가 추가되었습니다.

MA 앞뒤로 ADX

MA 앞뒤 ADX 1

MA 앞뒤로 ADX 2

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

로트 0.10 포함

MA 앞뒤로 ADX 3

파일:
 
SanAlex :

여기에 더 나은 결과가 있습니다 - 다른 필터 추가(MA 및 RSI)

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

로트 0.10 포함


좋은 저녁이에요! 나는 당신이 기성품 코드의 풍부한 라이브러리를 가지고 있다는 것을 알아차렸습니다. 새로운 바가 탄생할 당시 이전 바 시가가 얼마나 높았는지(또는 더 낮았는지) 결정하는 고문을 위한 기성 코드가 있을 수 있습니까? 안부 인사를 전합니다. 블라디미르.

 
MrBrooklin :

좋은 저녁이에요! 나는 당신이 기성품 코드의 풍부한 라이브러리를 가지고 있다는 것을 알아차렸습니다. 새로운 바가 탄생할 당시 이전 바 시가가 얼마나 높았는지(또는 더 낮았는지) 결정하는 고문을 위한 기성 코드가 있을 수 있습니까? 안부 인사를 전합니다. 블라디미르.

좋은 저녁이에요! 나는 독학으로 예제에서 코드를 취하고 과학적 파킹 방법으로 자신에게 주어진 과제를 달성합니다.

예를 들어, 이 기능에서 - 전문가의 결과가 더 나쁩니다.

 //+------------------------------------------------------------------+
//| 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 )
        {
         //--- change limit time by timeout in seconds if processed
         if (ExtExpert.Processing())
            limit_time= TimeCurrent ()+ExtTimeOut;
        }
     }
  }
//+------------------------------------------------------------------+

그리고 여기서 나는 내가 속인 것을 이해하지 못합니다. 그러나 전문가는 찔러 결과를 더 잘 보여줍니다.

 //+------------------------------------------------------------------+
//| Expert new tick handling function                                |
//+------------------------------------------------------------------+
void OnTick ( void )
  {
   static datetime limit_time= 0 ,ExtTimeOut= 0 ; // last trade processing time + timeout
//--- don't process if timeout
   limit_time= iTime ( Symbol (), Period (), 0 );
   if (ExtTimeOut==limit_time)
       return ;
//--- change limit time by timeout in seconds if processed
   if (ExtExpert.Processing())
      ExtTimeOut=limit_time;
  }
//+------------------------------------------------------------------+ 



   

 
SanAlex :

좋은 저녁이에요! 나는 독학으로 예제에서 코드를 취하고 과학적 파킹 방법으로 자신에게 주어진 과제를 달성합니다.

예를 들어, 이 기능에서 - 전문가의 결과가 더 나쁩니다.

그리고 여기서 나는 내가 속인 것을 이해하지 못합니다. 그러나 전문가는 찔러 결과를 더 잘 보여줍니다.



   

여기에서 차이점을 확인할 수 있습니다. 위의 예만 게시물로 교체하십시오.

- 이 EA에서

 //+------------------------------------------------------------------+
//|                                    EXP MA Back and forth ADX.mq5 |
//|                                  Copyright 2021, MetaQuotes Ltd. |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright    "Copyright 2021, MetaQuotes Ltd."
#property link          " https://www.mql5.com "
#property version      "1.00"
#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 7234102
//---
#include <Trade\Trade.mqh>
#include <Trade\SymbolInfo.mqh>
#include <Trade\PositionInfo.mqh>
#include <Trade\AccountInfo.mqh>
//---
input double InpLots          = 0.01 ; // Lots
input int     InpTakeProfit    = 500 ;   // Take Profit (in pips)
input int     InpTrailingStop  = 300 ;   // Trailing Stop Level (in pips)
input int     InpBars          = 1 ;     // Bars
input int     InpMATrendPeriod = 14 ;   // MA trend period
//+------------------------------------------------------------------+
//| 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
   int                m_handle_emas;                 // 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
   double             m_buff_EMAS[];                 // EMA indicator buffer
   //--- indicator data for processing
   double             m_macd_current;
   double             m_signal_current;
   double             m_ema_current;
   double             m_ema_previous;
   //---
   double             m_traling_stop;
   double             m_take_profit;

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

protected :
   bool               InitCheckParameters( const int digits_adjust);
   bool               InitIndicators( void );
   bool               LongClosed( void );
   bool               ShortClosed( void );
   bool               LongModified( void );
   bool               ShortModified( 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_handle_emas( INVALID_HANDLE ),
   m_macd_current( 0 ),
   m_signal_current( 0 ),
   m_ema_current( 0 ),
   m_ema_previous( 0 ),
   m_traling_stop( 0 ),
   m_take_profit( 0 )
  {
   ArraySetAsSeries (m_buff_MACD_main, true );
   ArraySetAsSeries (m_buff_MACD_signal, true );
   ArraySetAsSeries (m_buff_EMA, true );
   ArraySetAsSeries (m_buff_EMAS, true );
  }
//+------------------------------------------------------------------+
//| Destructor                                                       |
//+------------------------------------------------------------------+
CSampleExpert::~CSampleExpert( void )
  {
  }
//+------------------------------------------------------------------+
//| 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_traling_stop    =InpTrailingStop*m_adjusted_point;
   m_take_profit     =InpTakeProfit*m_adjusted_point;
//--- set default deviation for trading in adjusted points
   m_trade.SetDeviationInPoints( 3 *digits_adjust);
//---
   if (!InitCheckParameters(digits_adjust))
       return ( false );
   if (!InitIndicators())
       return ( false );
//--- succeed
   return ( true );
  }
//+------------------------------------------------------------------+
//| Checking for input parameters                                    |
//+------------------------------------------------------------------+
bool CSampleExpert::InitCheckParameters( const int digits_adjust)
  {
//--- initial data checks
   if (InpTakeProfit*digits_adjust<m_symbol.StopsLevel())
     {
       printf ( "Take Profit must be greater than %d" ,m_symbol.StopsLevel());
       return ( false );
     }
   if (InpTrailingStop*digits_adjust<m_symbol.StopsLevel())
     {
       printf ( "Trailing Stop must be greater than %d" ,m_symbol.StopsLevel());
       return ( false );
     }
//--- check for right lots amount
   if (InpLots<m_symbol.LotsMin() || InpLots>m_symbol.LotsMax())
     {
       printf ( "Lots amount must be in the range from %f to %f" ,m_symbol.LotsMin(),m_symbol.LotsMax());
       return ( false );
     }
   if ( MathAbs (InpLots/m_symbol.LotsStep()- MathRound (InpLots/m_symbol.LotsStep()))> 1.0 E- 10 )
     {
       printf ( "Lots amount is not corresponding with lot step %f" ,m_symbol.LotsStep());
       return ( false );
     }
//--- warning
   if (InpTakeProfit<=InpTrailingStop)
       printf ( "Warning: Trailing Stop must be less than Take Profit" );
//--- succeed
   return ( true );
  }
//+------------------------------------------------------------------+
//| Initialization of the indicators                                 |
//+------------------------------------------------------------------+
bool CSampleExpert::InitIndicators( void )
  {
//--- create MACD indicator
   if (m_handle_macd== INVALID_HANDLE )
       if ((m_handle_macd= iADX ( NULL , 0 , 14 ))== 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_LWMA , PRICE_CLOSE ))== INVALID_HANDLE )
        {
         printf ( "Error creating EMA indicator" );
         return ( false );
        }
//--- create EMA indicator and add it to collection
   if (m_handle_emas== INVALID_HANDLE )
       if ((m_handle_emas= iMA ( NULL , 0 ,InpMATrendPeriod, 0 , MODE_SMA , PRICE_OPEN ))== INVALID_HANDLE )
        {
         printf ( "Error creating EMA indicator" );
         return ( false );
        }
//--- succeed
   return ( true );
  }
//+------------------------------------------------------------------+
//| Check for long position closing                                  |
//+------------------------------------------------------------------+
bool CSampleExpert::LongClosed( void )
  {
   bool res= false ;
//--- should it be closed?
   if (m_macd_current<m_signal_current && m_ema_current<m_ema_previous)
     {
       //--- close position
       if (m_trade.PositionClose( Symbol ()))
         printf ( "Long position by %s to be closed" , Symbol ());
       else
         printf ( "Error closing position by %s : '%s'" , Symbol (),m_trade.ResultComment());
       //--- processed and cannot be modified
      res= true ;
     }
//--- result
   return (res);
  }
//+------------------------------------------------------------------+
//| Check for short position closing                                 |
//+------------------------------------------------------------------+
bool CSampleExpert::ShortClosed( void )
  {
   bool res= false ;
//--- should it be closed?
   if (m_macd_current>m_signal_current && m_ema_current>m_ema_previous)
     {
       //--- close position
       if (m_trade.PositionClose( Symbol ()))
         printf ( "Short position by %s to be closed" , Symbol ());
       else
         printf ( "Error closing position by %s : '%s'" , Symbol (),m_trade.ResultComment());
       //--- processed and cannot be modified
      res= true ;
     }
//--- result
   return (res);
  }
//+------------------------------------------------------------------+
//| Check for long position modifying                                |
//+------------------------------------------------------------------+
bool CSampleExpert::LongModified( void )
  {
   bool res= false ;
//--- check for trailing stop
   if (InpTrailingStop> 0 )
     {
       if (m_symbol.Bid()-m_position.PriceOpen()>m_adjusted_point*InpTrailingStop)
        {
         double sl= NormalizeDouble (m_symbol.Bid()-m_traling_stop,m_symbol. Digits ());
         double tp=m_position.TakeProfit();
         if (m_position.StopLoss()<sl || m_position.StopLoss()== 0.0 )
           {
             //--- modify position
             if (m_trade.PositionModify( Symbol (),sl,tp))
               printf ( "Long position by %s to be modified" , Symbol ());
             else
              {
               printf ( "Error modifying position by %s : '%s'" , Symbol (),m_trade.ResultComment());
               printf ( "Modify parameters : SL=%f,TP=%f" ,sl,tp);
              }
             //--- modified and must exit from expert
            res= true ;
           }
        }
     }
//--- result
   return (res);
  }
//+------------------------------------------------------------------+
//| Check for short position modifying                               |
//+------------------------------------------------------------------+
bool CSampleExpert::ShortModified( void )
  {
   bool    res= false ;
//--- check for trailing stop
   if (InpTrailingStop> 0 )
     {
       if ((m_position.PriceOpen()-m_symbol.Ask())>(m_adjusted_point*InpTrailingStop))
        {
         double sl= NormalizeDouble (m_symbol.Ask()+m_traling_stop,m_symbol. Digits ());
         double tp=m_position.TakeProfit();
         if (m_position.StopLoss()>sl || m_position.StopLoss()== 0.0 )
           {
             //--- modify position
             if (m_trade.PositionModify( Symbol (),sl,tp))
               printf ( "Short position by %s to be modified" , Symbol ());
             else
              {
               printf ( "Error modifying position by %s : '%s'" , Symbol (),m_trade.ResultComment());
               printf ( "Modify parameters : SL=%f,TP=%f" ,sl,tp);
              }
             //--- modified and must exit from expert
            res= true ;
           }
        }
     }
//--- result
   return (res);
  }
//+------------------------------------------------------------------+
//| Check for long position opening                                  |
//+------------------------------------------------------------------+
bool CSampleExpert::LongOpened( void )
  {
   bool res= false ;
//--- check for long position (BUY) possibility
   if (m_macd_current>m_signal_current && m_ema_current>m_ema_previous)
     {
       double price=m_symbol.Ask();
       double tp   =m_symbol.Bid()+m_take_profit;
       //--- check for free money
       if (m_account.FreeMarginCheck( Symbol (), ORDER_TYPE_BUY ,InpLots,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 ,InpLots,price, 0.0 ,tp))
             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,TP=%f" ,price,tp);
           }
        }
       //--- 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<m_signal_current && m_ema_current<m_ema_previous)
     {
       double price=m_symbol.Bid();
       double tp   =m_symbol.Ask()-m_take_profit;
       //--- check for free money
       if (m_account.FreeMarginCheck( Symbol (), ORDER_TYPE_SELL ,InpLots,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 ,InpLots,price, 0.0 ,tp))
             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,TP=%f" ,price,tp);
           }
        }
       //--- 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 )
  {
//--- refresh rates
   if (!m_symbol.RefreshRates())
       return ( false );
//--- refresh indicators
   if ( BarsCalculated (m_handle_macd)< 2 || BarsCalculated (m_handle_ema)< 2 || BarsCalculated (m_handle_emas)< 2 )
       return ( false );
   if ( CopyBuffer (m_handle_macd, 1 ,InpBars, 2 ,m_buff_MACD_main)  != 2 ||
       CopyBuffer (m_handle_macd, 2 ,InpBars, 2 ,m_buff_MACD_signal)!= 2 ||
       CopyBuffer (m_handle_ema, 0 ,InpBars, 2 ,m_buff_EMA)         != 2 ||
       CopyBuffer (m_handle_emas, 0 ,InpBars, 2 ,m_buff_EMAS)       != 2 )
       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_signal_current =m_buff_MACD_signal[ 0 ];
   m_ema_current    =m_buff_EMA[ 0 ];
   m_ema_previous   =m_buff_EMAS[ 0 ];
//--- 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
   if (m_position.Select( Symbol ()))
     {
       if (m_position.PositionType()== POSITION_TYPE_BUY )
        {
         //--- try to close or modify long position
         if (LongClosed())
             return ( true );
         if (LongModified())
             return ( true );
        }
       else
        {
         //--- try to close or modify short position
         if (ShortClosed())
             return ( true );
         if (ShortModified())
             return ( true );
        }
     }
//--- no opened position identified
   else
     {
       //--- 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 ,ExtTimeOut= 0 ; // last trade processing time + timeout
//--- don't process if timeout
   limit_time= iTime ( Symbol (), Period (), 0 );
   if (ExtTimeOut==limit_time)
       return ;
//--- change limit time by timeout in seconds if processed
   if (ExtExpert.Processing())
      ExtTimeOut=limit_time;
  }
//+------------------------------------------------------------------+
 
SanAlex :

여기에서 차이점을 확인할 수 있습니다. 위의 예만 게시물로 교체하십시오.

- 이 EA에서

고맙습니다! 내가 해볼게! 안부 인사를 전합니다. 블라디미르.

 
모든 건강과 행운을 빕니다! 간단히 - 찾기를 주저했습니다. 모든 사람은 성에 들어가고 나가는 것에 대한 자신의 비전을 가지고 있습니다. 길을 가다가 우연히 만난 고문들, 가끔 삐딱하게 일하다 갑자기 주문을 삭제했다가 갑자기 올려놓는데 무슨 근거로 했는지는 불명.

글을 쓰고 싶지만 프로그래밍을 할 수 없습니다. 조언을 듣고 별도의 지점을 열기로 결정했습니다.


고문의 근무 조건

1. 모든 거래를 수동으로 거래하지 않습니다(구매 및 판매).

2. 시장 진입 --- 테이크 앤 트레일링(규제되어야 함)과 동시에 2-3배 더 많은 보류 중인 주문(규제되어야 함) 거래가 +에서 마감되면 보류 중인 주문 이 삭제됩니다.

대기 중인 주문에는 최소 소요 시간 +(조정 가능)가 설정되어 있습니다.

3. 보류가 트리거될 때 --- 다른 보류가 주문의 레벨 1로 설정됩니다(즉, 전체가 같아야 함).

4. 가격이 반환되고 잠금이 형성되면 --- 모든 테이크가 제거됩니다.

5 자물쇠의 어느 부분이 열리면 이 부분과 같은 부피로 예금자가 열립니다. 15 -20 포인트를 통한 이동(조정) 즉, 구매를 열면 구매가 지연되고 그 반대도 마찬가지입니다.


나는 모든 제안에 기쁠 것입니다. 그러한 기적이 빛에 나타난다면 그것은 오픈 소스에 관심이 있는 모든 사람들에게 펼쳐질 것입니다. mt4용.
 
안녕하세요 개발자님! 나는 뇌졸중 후 1 gr을 사용할 수 없습니다. 그리고 상황에 따라 스스로 올빼미를 쓰는 것은 불가능합니다. 아주 간단한 봇이 필요합니다. 내가 만든 레벨에서 포즈를 열려면. 스톱은 거의 없고 반대 거래만 있을 것입니다. 흥미로운 알고리즘 도와주세요. 두 번째 봇은 일반적으로 폭탄이 될 것이고 뉴스 봇은 일반적으로 독특할 것입니다. 모든 것이 순전히 내 개발입니다 그래서 그래서 그래서
 
좋은 하루, 친애하는 프로그래머.

이 아이디어는 오랫동안 내 머리 속에 있었습니다. 수동으로 하려고 했는데 헷갈리네요. 그런 알고리즘은 거래 어디에도 없다고 확신합니다(3번 포인트).

1. EA는 고가 - 매수, 저가 - 매도 양초의 각 분석에 대해 주문을 엽니다.

2. TR은 작업 시간 프레임에서 하나의 ATR과 같습니다.

3. TP로 주문을 마감한 후, 어드바이저는 가장 수익성이 없는 주문과 마감된 주문의 TP의 30%를 가져갑니다(어드바이저의 변수 데이터에 출력)

손실 주문의 TP를 네거티브 영역으로 추적

따라서 손실로 마감될 때까지 손실 주문을 유도합니다. 그런 다음 가장 수익성이없는 주문을 다시 찾아 손실로 마감합니다.

각 시리즈에서 스왑 및 커미션을 고려하여 최소 60%의 이익을 얻습니다.



 

최신 지그재그 신호를 찾는 데 도움

 double ZigUp, ZigFrDn;
     ZigUp = iCustom ( NULL , 0 ,IndName,ExtDepth,ExtDeviation,ExtBackstep, 0 , 1 );
   for ( int i= 1 ; i< 500 ; i++) 
     ZigDn = iCustom ( NULL , 0 ,IndName,ExtDepth,ExtDeviation,ExtBackstep, 0 ,i);

조건에 따라 마지막 것이 Up-sell이면 Dn-buy입니다.

작동하거나 작동하지 않거나 ... (또는 전혀 작동하지 않을 수도 있음)

 
Hi-Fi :

최신 지그재그 신호를 찾는 데 도움

조건에 따라 마지막 것이 Up-sell이면 Dn-buy입니다.

작동하거나 작동하지 않거나 ... (또는 전혀 작동하지 않을 수도 있음)

 //+----------------------------------------------------------------------------+
//|  Автор    : Ким Игорь В. aka KimIV,  http://www.kimiv.ru                    |
//+----------------------------------------------------------------------------+
//|  Версия   : 07.10.2006                                                     |
//|  Описание : Возвращает номер бара экстремума ЗигЗага по его номеру.        |
//+----------------------------------------------------------------------------+
//|  Параметры:                                                                |
//|    sy - наименование инструмента   (NULL или "" - текущий символ)          |
//|    tf - таймфрейм                  (      0     - текущий ТФ)              |
//|    ne - номер экстремума           (      0     - последний)               |
//|    dp - ExtDepth                                                           |
//|    dv - ExtDeviation                                                       |
//|    bs - ExtBackstep                                                        |
//+----------------------------------------------------------------------------+
int GetExtremumZZBar( string sy= "" , int tf= 0 , int ne= 0 , int dp= 12 , int dv= 5 , int bc= 3 ) {
   if (sy== "" || sy== "0" ) sy= Symbol ();
   double zz;
   int     i, k=iBars(sy, tf), ke= 0 ;

   for (i= 0 ; i<k; i++) {
    zz= iCustom (sy, tf, "ZigZag" , dp, dv, bc, 0 , i);
     if (zz!= 0 ) {
      ke++;
       if (ke>ne) return (i);
    }
  }
   Print ( "GetExtremumZZBar(): Экстремум ЗигЗага номер " ,ne, " не найден" );
   return (- 1 );
}
 //+----------------------------------------------------------------------------+
//|  Автор    : Ким Игорь В. aka KimIV,  http://www.kimiv.ru                    |
//+----------------------------------------------------------------------------+
//|  Версия   : 07.10.2006                                                     |
//|  Описание : Возвращает экстремум ЗигЗага по его номеру.                    |
//+----------------------------------------------------------------------------+
//|  Параметры:                                                                |
//|    sy - наименование инструмента   (NULL или "" - текущий символ)          |
//|    tf - таймфрейм                  (      0     - текущий ТФ)              |
//|    ne - номер экстремума           (      0     - последний)               |
//|    dp - ExtDepth                                                           |
//|    dv - ExtDeviation                                                       |
//|    bs - ExtBackstep                                                        |
//+----------------------------------------------------------------------------+
double GetExtremumZZPrice( string sy= "" , int tf= 0 , int ne= 0 , int dp= 12 , int dv= 5 , int bs= 3 ) {
   if (sy== "" || sy== "0" ) sy= Symbol ();
   double zz;
   int     i, k= iBars (sy, tf), ke= 0 ;

   for (i= 1 ; i<k; i++) {
    zz= iCustom (sy, tf, "ZigZag" , dp, dv, bs, 0 , i);
     if (zz!= 0 ) {
      ke++;
       if (ke>ne) return (zz);
    }
  }
   Print ( "GetExtremumZZPrice(): Экстремум ЗигЗага номер " ,ne, " не найден" );
   return ( 0 );
}