Ücretsiz danışmanlar yazıyoruz - sayfa 13

 
SanAlex :

SONUÇ: Gösterge "İleri ADX" Mart Nisan - bir nedenden dolayı başarılı değil

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

işte gösterge

İşte daha iyi bir sonuç - başka bir filtre eklendi (MA ve RSI)

MA İleri geri ADX

MA İleri ve geri ADX 1

MA İleri geri ADX 2

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

Parti 0.10 ile

MA İleri geri ADX 3

Dosyalar:
 
SanAlex :

İşte daha iyi bir sonuç - başka bir filtre eklendi (MA ve RSI)

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

Parti 0.10 ile


İyi akşamlar! Hazır kodlardan oluşan zengin bir kütüphaneniz olduğunu fark ettim. Belki bir danışman için, yeni bir bar doğduğunda önceki barın açılış fiyatının ne kadar yüksek (veya düşük) olduğunu belirleyecek hazır bir kod vardır? Saygılarımla, Vladimir.

 
MrBrooklin :

İyi akşamlar! Hazır kodlardan oluşan zengin bir kütüphaneniz olduğunu fark ettim. Belki bir danışman için, yeni bir bar doğduğunda önceki barın açılış fiyatının ne kadar yüksek (veya düşük) olduğunu belirleyecek hazır bir kod vardır? Saygılarımla, Vladimir.

İyi akşamlar! Kendi kendimi yetiştiriyorum ve örneklerden kodlar alıyorum ve bilimsel dürtme yöntemiyle kendim için belirlenen görevi gerçekleştiriyorum.

Örneğin, bu işlevden - uzmanın sonucu daha kötü

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

ve burada kendim neyi aldattığımı anlamıyorum - ama dürterek uzman sonucu daha iyi gösteriyor.

 //+------------------------------------------------------------------+
//| 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 :

İyi akşamlar! Kendi kendimi yetiştiriyorum ve örneklerden kodlar alıyorum ve bilimsel dürtme yöntemiyle kendim için belirlenen görevi gerçekleştiriyorum.

Örneğin, bu işlevden - uzmanın sonucu daha kötü

ve burada kendim neyi aldattığımı anlamıyorum - ama dürterek uzman sonucu daha iyi gösteriyor.



   

Burada farkı kontrol edebilirsiniz - yalnızca yukarıdaki örneği gönderiyle değiştirin

- bu EA'da

 //+------------------------------------------------------------------+
//|                                    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 :

Burada farkı kontrol edebilirsiniz - yalnızca yukarıdaki örneği gönderiyle değiştirin

- bu EA'da

Teşekkür ederim! Deneyeceğim! Saygılarımla, Vladimir.

 
tüm sağlık ve iyi şanslar! kısaca - aramaya tereddüt etti. herkesin kalelere girme ve çıkma konusunda kendi vizyonu vardır. Yol boyunca karşılaştığım danışmanlar bazen çarpık çalıştılar, sonra aniden siparişleri sildiler, sonra aniden koydular, neye dayanarak belli değil.

Kendim yazmak isterdim ama programlama ile uğraşamam. tavsiyeyi dikkate aldı ve ayrı bir şube açmaya karar verdi.


danışman çalışma koşulları

1. tüm işlemleri manuel olarak yapmaz (al ve sat)

2. piyasaya giriş --- bir alım ve takip (düzenlenmelidir) ve aynı zamanda 2-3 kat daha fazla bekleyen emir (düzenlenmelidir) eğer işlem + ile kapanırsa bekleyen emir silinir.

bekleyen bir siparişin minimum + olarak ayarlanmış bir süresi vardır (ayarlama imkanı)

3. bekleyen tetiklendiğinde --- başka bir bekleyen siparişin 1. düzeyine ayarlanır (yani toplamda eşit olmalıdır)

4.Eğer fiyat geri dönerse ve bir kilit oluşursa --- o zaman tüm alımlar silinir.

5 Kilidin herhangi bir kısmı açıldığında, bu kısma eşit hacimde bir mudi açılır. 15 -20 puan arasındaki harekette (ayarlayın), yani bir satın alma açarsam, satın alma için bir gecikme ve tam tersi.


her şey gibi.Herhangi bir öneriye memnun olacağım. Böyle bir mucizenin ortaya çıkması şartıyla, açık kaynakla ilgilenen herkes için ortaya konulacaktır. mt4 için.
 
Merhaba Lord Geliştiriciler! İnme sonrası 1 gr engelliyim. Ve koşullar nedeniyle kendim bir baykuş yazmam imkansız. Oldukça basit bir bota ihtiyacımız var. Oluşturduğum seviyelerden pozları açmak için. Pratikte durak olmayacak, sadece zıt işlemler olacak. Algoritma ilginç Lütfen yardım edin. İkinci bot genel olarak bomba olacak ve haber botu genel olarak benzersiz olacak, her şey tamamen benim gelişimim Böyle böyle böyle
 
İyi günler, Sevgili Programcılar.

Bu fikir uzun zamandır kafamdaydı. Manuel olarak yapmaya çalıştım ama kafam karıştı. Ticarette hiçbir yerde böyle bir algoritma olmadığından eminim (3. nokta).

1. EA, Yüksek - Alış, Düşük - Satış mumlarının her dökümünde siparişler açar.

2. TR, çalışma zaman diliminde bir ATR'ye eşittir.

3. Siparişi TP ile kapattıktan sonra, danışman en kârsız siparişi ve kapatılan siparişin TP'sinin %30'unu alır (danışmanın değişken verilerine çıktı)

zarar verme emrinin TP'sini negatif bölgeye doğru takip eder (başlangıçta aldığım ve sonra kârın bir yüzdesini verdiğim ilkesine göre çalışır)

ve böylece bir kayıpla kapatılana kadar kaybedilen bir düzene yol açar. Sonra yine en kârsız emri bulur ve zararla kapatmaya götürür.

bu tür her seride, takas ve komisyonlar dikkate alınarak en az %60 kar elde edeceğiz.



 

En son ZigZag sinyalini bulma konusunda yardım

 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);

Koşul olarak, sonuncusu Yukarı-satış ise, Dn-al.

Ya çalışıyor, ya çalışmıyor... (Ya da belki hiç çalışmıyor)

 
Hi-Fi :

En son ZigZag sinyalini bulma konusunda yardım

Koşul olarak, eğer sonuncusu Yukarı-satış ise, o zaman Dn-buy.

Ya çalışıyor, ya çalışmıyor... (Ya da belki hiç çalışmıyor)

 //+----------------------------------------------------------------------------+
//|  Автор    : Ким Игорь В. 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 );
}
Neden: