깊이 있는 상승세 표시기 - 페이지 4

 

이 CodeBase 링크 의 시계 표시기.

그건 그렇고 - 이 표시기의 현지 시간은 내 현지 시간이 아닌 컴퓨터 시간(내 PC 시간)입니다. :)

따라서이 표시기는 GMT 시간, 중개인 시간 및 PC 시간을 표시합니다.

 
newdigital :

이 CodeBase 링크 의 시계 표시기.

그건 그렇고 - 이 표시기의 현지 시간은 내 현지 시간이 아닌 컴퓨터 시간(내 PC 시간)입니다. :)

따라서이 표시기는 GMT 시간, 중개인 시간 및 PC 시간을 표시합니다.

PC가 현지 시간에 설정되어 있지 않습니까? 왜, 거래를 위해?
 
거래용이 아닙니다. 방금 설정하는 것을 잊었습니다 :) 내 현지 시간은 GMT + 3입니다( 일광 절약 시간제 는 모든 국가에서 비활성화되었지만 어쨌든 - DST에 내 PC 시계를 변경한 적이 없습니다)
 

Asctrend 돌아 왔습니다. 이미 말했듯이 Asctrend는 WPR 표시기를 기반으로 합니다.

Asctrend에는 1개의 입력 매개변수 (위험)만 있습니다. 이 매개변수는 WPR 기간 매도/매수 수준을 정의하는 데 사용됩니다. 위험에 대한 "과거" 기본값은 3입니다. (Asctrend에서 게시한 값은 4입니다. 이유는 알 수 없음).

Asctrend WPR Period = 3 + RISK * 2 = 9 by default.

Asctrend WPR buy level > - (33 - RISK)

            sell level < - (67 + RISK)


또한 갭 및 피크에 대한 몇 가지 예외 처리가 있습니다. 그리고 같은 방향의 신호가 이미 존재하는 경우 신호의 내부 필터링.


 

ASCtrend(알람 설정).

안녕; 도와주세요.

"ASCtrend" 표시기에 알람을 설정하고 싶습니다.(이전 촛불에 신호가 나타날 때 새 촛불 보내기 알람 시작)

밝은 선을 추가하십시오.

 //+------------------------------------------------------------------+
//|                                                     ASCtrend.mq5 |
//|                             Copyright © 2011,   Nikolay Kositsin | 
//|                              Khabarovsk,   farria@mail.redcom.ru | 
//+------------------------------------------------------------------+
#property copyright "Copyright © 2011, Nikolay Kositsin"
#property link "farria@mail.redcom.ru"
#property description "ASCtrend"
//---- indicator version
#property version   "1.00"
//---- drawing the indicator in the main window
#property indicator_chart_window 
//---- two buffers are used for calculation and drawing the indicator
#property indicator_buffers 2
//---- only two plots are used
#property indicator_plots   2
//+----------------------------------------------+
//|  Bearish indicator drawing parameters        |
//+----------------------------------------------+
//---- drawing the indicator 1 as a symbol
#property indicator_type1   DRAW_ARROW
//---- magenta color is used as the color of the bearish indicator line
#property indicator_color1  Magenta
//---- thickness of the indicator 1 line is equal to 4
#property indicator_width1   4
//---- bullish indicator label display
#property indicator_label1   "ASCtrend Sell"
//+----------------------------------------------+
//|  Bullish indicator drawing parameters        |
//+----------------------------------------------+
//---- drawing the indicator 2 as a symbol
#property indicator_type2   DRAW_ARROW
//---- blue color is used as the color of a bullish candlestick
#property indicator_color2  Blue
//---- thickness of the indicator 2 line is equal to 4
#property indicator_width2   4
//---- bearish indicator label display
#property indicator_label2 "ASCtrend Buy"

#define RESET 0 // The constant for getting the command for the indicator recalculation back to the terminal
//+----------------------------------------------+
//|  Indicator input parameters                  |
//+----------------------------------------------+
input int RISK= 4 ;
//+----------------------------------------------+

//---- declaration of dynamic arrays that further 
// will be used as indicator buffers
double SellBuffer[];
double BuyBuffer[];
//----
int   StartBars,x1,x2,value10,value11,WPR_Handle[ 3 ];
//+------------------------------------------------------------------+
extern bool SoundON= true ; //Alert
extern bool EmailON= true ; //false; //Email
extern bool PushON= true ; //Allow to send a signal to the mobile
input uint NumberofAlerts= 10 ;
uint counter= 0 ;
//+------------------------------------------------------------------+
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
void OnInit ()
  {
//---- initialization of global variables   
   x1= 67 +RISK;
   x2= 33 -RISK;
   value10= 2 ;
   value11=value10;
   StartBars= int ( MathMax ( 3 +RISK* 2 , 4 )+ 1 );

//---- getting handle of the iWPR 1 indicator
   WPR_Handle[ 0 ]= iWPR ( NULL , 0 , 3 );
   if (WPR_Handle[ 0 ]== INVALID_HANDLE ) Print ( " Failed to get handle of the iWPR 1 indicator" );
//---- getting handle of the iWPR 2 indicator
   WPR_Handle[ 1 ]= iWPR ( NULL , 0 , 4 );
   if (WPR_Handle[ 1 ]== INVALID_HANDLE ) Print ( " Failed to get handle of the iWPR 2 indicator" );
//---- getting handle of the iWPR 3 indicator
   WPR_Handle[ 2 ]= iWPR ( NULL , 0 , 3 +RISK* 2 );
   if (WPR_Handle[ 2 ]== INVALID_HANDLE ) Print ( " Failed to get handle of the iWPR 3 indicator" );

//---- set dynamic array as an indicator buffer
   SetIndexBuffer ( 0 ,SellBuffer, INDICATOR_DATA );
//---- shifting the start of drawing the indicator 1
   PlotIndexSetInteger ( 0 , PLOT_DRAW_BEGIN ,StartBars);
//---- create a label to display in DataWindow
   PlotIndexSetString ( 0 , PLOT_LABEL , "ASCtrend Sell" );
//---- indicator symbol
   PlotIndexSetInteger ( 0 , PLOT_ARROW , 108 );
//---- indexing the elements in the buffer as timeseries
   ArraySetAsSeries (SellBuffer, true );
//---- setting values of the indicator that won't be visible on a chart
   PlotIndexSetDouble ( 0 , PLOT_EMPTY_VALUE , 0 );

//---- set dynamic array as an indicator buffer
   SetIndexBuffer ( 1 ,BuyBuffer, INDICATOR_DATA );
//---- shifting the start of drawing the indicator 2
   PlotIndexSetInteger ( 1 , PLOT_DRAW_BEGIN ,StartBars);
//---- create a label to display in DataWindow
   PlotIndexSetString ( 1 , PLOT_LABEL , "ASCtrend Buy" );
//---- indicator symbol
   PlotIndexSetInteger ( 1 , PLOT_ARROW , 108 );
//---- indexing the elements in the buffer as timeseries
   ArraySetAsSeries (BuyBuffer, true );
//---- setting values of the indicator that won't be visible on a chart
   PlotIndexSetDouble ( 1 , PLOT_EMPTY_VALUE , 0 );

//---- Setting the format of accuracy of displaying the indicator
   IndicatorSetInteger ( INDICATOR_DIGITS , _Digits );
//---- name for the data window and the label for tooltips 
   string short_name= "ASCtrend" ;
   IndicatorSetString ( INDICATOR_SHORTNAME ,short_name);
//----   
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int OnCalculate ( const int rates_total,
                 const int prev_calculated,
                 const datetime &time[],
                 const double &open[],
                 const double &high[],
                 const double &low[],
                 const double &close[],
                 const long &tick_volume[],
                 const long &volume[],
                 const int &spread[])
  {
//---- checking the number of bars to be enough for the calculation
   if ( BarsCalculated (WPR_Handle[ 0 ])<rates_total
      || BarsCalculated (WPR_Handle[ 1 ])<rates_total
      || BarsCalculated (WPR_Handle[ 2 ])<rates_total
      || rates_total<StartBars)
       return (RESET);

//---- declarations of local variables 
   int limit,bar,count,iii;
   double value2,value3,Vel= 0 ,WPR[];
   double TrueCount,Range,AvgRange,MRO1,MRO2;

//---- calculations of the necessary amount of data to be copied and
//the limit starting index for loop of bars recalculation
   if (prev_calculated>rates_total || prev_calculated<= 0 ) // checking for the first start of the indicator calculation
      limit=rates_total-StartBars; // starting index for calculation of all bars
   else limit=rates_total-prev_calculated; // starting index for calculation of new bars

//---- indexing elements in arrays as timeseries  
   ArraySetAsSeries (WPR, true );
   ArraySetAsSeries (open, true );
   ArraySetAsSeries (high, true );
   ArraySetAsSeries (low, true );
   ArraySetAsSeries (close, true );

//---- main indicator calculation loop
   for (bar=limit; bar>= 0 && ! IsStopped (); bar--)
     {
      Range= 0.0 ;
      AvgRange= 0.0 ;
       for (count=bar; count<=bar+ 9 ; count++) AvgRange=AvgRange+ MathAbs (high[count]-low[count]);

      Range=AvgRange/ 10 ;
      count=bar;
      TrueCount= 0 ;

       while (count<bar+ 9 && TrueCount< 1 )
        {
         if ( MathAbs (open[count]-close[count+ 1 ])>=Range* 2.0 ) TrueCount++;
         count++;
        }

       if (TrueCount>= 1 ) MRO1=count;
       else              MRO1=- 1 ;

      count=bar;
      TrueCount= 0 ;

       while (count<bar+ 6 && TrueCount< 1 )
        {
         if ( MathAbs (close[count+ 3 ]-close[count])>=Range* 4.6 ) TrueCount++;
         count++;
        }

       if (TrueCount>= 1 ) MRO2=count;
       else              MRO2=- 1 ;

       if (MRO1>- 1 ) {value11= 0 ;} else {value11=value10;}
       if (MRO2>- 1 ) {value11= 1 ;} else {value11=value10;}

       if ( CopyBuffer (WPR_Handle[value11], 0 ,bar, 1 ,WPR)<= 0 ) return (RESET);

      value2= 100 - MathAbs (WPR[ 0 ]); // PercentR(value11=9)

      SellBuffer[bar]= 0 ;
      BuyBuffer[bar]= 0 ;

      value3= 0 ;

       if (value2<x2)
        {
         iii= 1 ;
         while (bar+iii<rates_total)
           {
             if ( CopyBuffer (WPR_Handle[value11], 0 ,bar+iii, 1 ,WPR)<= 0 ) return (RESET);
            Vel= 100 - MathAbs (WPR[ 0 ]);
             if (Vel>=x2 && Vel<=x1) iii++;
             else break ;
           }

         if (Vel>x1)
           {
            value3=high[bar]+Range* 0.5 ;
            SellBuffer[bar]=value3;
           }
        }
       if (value2>x1)
        {
         iii= 1 ;
         while (bar+iii<rates_total)
           {
             if ( CopyBuffer (WPR_Handle[value11], 0 ,bar+iii, 1 ,WPR)<= 0 ) return (RESET);
            Vel= 100 - MathAbs (WPR[ 0 ]);
             if (Vel>=x2 && Vel<=x1) iii++;
             else break ;
           }

         if (Vel<x2)
           {
            value3=low[bar]-Range* 0.5 ;
            BuyBuffer[bar]=value3;
           }
        }
     }
//----------------------------------------------------------------------//    

     Comment ( "        BuyBuffer[rates_total-4]=" ,BuyBuffer[rates_total- 4 ], "   DateTime[rates_total-4]=" ,time[rates_total- 4 ]
      , "\n        BuyBuffer[rates_total-3]=" ,BuyBuffer[rates_total- 3 ], "   DateTime[rates_total-3]=" ,time[rates_total- 3 ]
      , "\n        BuyBuffer[rates_total-2]=" ,BuyBuffer[rates_total- 2 ], "   DateTime[rates_total-2]=" ,time[rates_total- 2 ]
      , "\n        BuyBuffer[rates_total-1]=" ,BuyBuffer[rates_total- 1 ], "   DateTime[rates_total-1]=" ,time[rates_total- 1 ]
      , "\n        SellBuffer[rates_total-4]=" ,SellBuffer[rates_total- 4 ], "   DateTime[rates_total-4]=" ,time[rates_total- 4 ]
      , "\n        SellBuffer[rates_total-3]=" ,SellBuffer[rates_total- 3 ], "   DateTime[rates_total-3]=" ,time[rates_total- 3 ]
      , "\n        SellBuffer[rates_total-2]=" ,SellBuffer[rates_total- 2 ], "   DateTime[rates_total-2]=" ,time[rates_total- 2 ]      
      , "\n        SellBuffer[rates_total-1]=" ,SellBuffer[rates_total- 1 ], "   DateTime[rates_total-1]=" ,time[rates_total- 1 ]
      , "\n  rates_total=" ,rates_total
      , "\n  prev_calculated=" ,prev_calculated
     );
 
//-----------------------------------   
//----------------------------------------------------------------------//

   MqlDateTime tm;
   double Ask,Bid;
   string text,sAsk,sBid,sPeriod;      
   TimeToStruct ( TimeCurrent (),tm);
   text= TimeToString ( TimeCurrent (),TIME_DATE)+ " " + string (tm.hour)+ ":" + string (tm.min);
   Ask=close[ 0 ];
   Bid=close[ 0 ]+spread[ 0 ];
   sAsk= DoubleToString (Ask, _Digits );
   sBid= DoubleToString (Bid, _Digits );
   sPeriod= EnumToString ( ChartPeriod ());    
   if (rates_total!=prev_calculated) counter= 0 ;  
     
   if ( BuyBuffer[rates_total- 2 ]!=0 ) 
     {
       if (counter<NumberofAlerts) 
        {
         counter++; 
         if (SoundON) 
           {
             Alert ( "ASC_TREND BUY signal at Ask=" ,Ask, "\n Bid=" ,Bid, "\n currtime=" ,text, "\n Symbol=" , Symbol (), " Period=" ,sPeriod);
             PlaySound ( "matrixrevolution.wav" );
             //  PlaySound("SysAlert1.wav");
             //   PlaySound("samsam.wav");
             //    PlaySound("Alert_Play.wav");
            }
         if (EmailON) SendMail ( "ASC_TREND : BUY signal alert" , "BUY signal at Ask=" +sAsk+ ", Bid=" +sBid+ ", Date=" +text+ " Symbol=" + Symbol ()+ " Period=" +sPeriod);
         if (PushON) SendNotification( "ASC_TREND: BUY signal at Ask=" +sAsk+ ", Bid=" +sBid+ ", Date=" +text+ " Symbol=" + Symbol ()+ " Period=" +sPeriod);
        }
     } 
      
   if (SellBuffer[rates_total- 2 ]!=0 ) 
     { 
       if (counter<NumberofAlerts)
        {
         counter++;
         if (SoundON)
           {
             Alert ( "ASC_TREND SELL signal at Ask=" ,sAsk, "\n Bid=" ,sBid, "\n Date=" ,text, "\n Symbol=" , Symbol (), " Period=" ,sPeriod);
             PlaySound ( "matrixrevolution.wav" );
             //  PlaySound("SysAlert1.wav");
             //  PlaySound("samsam.wav");
             //    PlaySound("Alert_Play.wav");
           }
         if (EmailON) SendMail ( "ASC_TREND" , "SELL signal at Ask=" +sAsk+ ", Bid=" +sBid+ ", Date=" +text+ " Symbol=" + Symbol ()+ " Period=" +sPeriod);
         if (PushON) SendNotification( "ASC_TREND: SELL signal at Ask=" +sAsk+ ", Bid=" +sBid+ ", Date=" +text+ " Symbol=" + Symbol ()+ " Period=" +sPeriod);
        }
     }
      
//----------------------------------------------------------------------//           
//----     
   return (rates_total);
  }
//+------------------------------------------------------------------+
//+------------------------------------------------------------------+
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                       |
//+------------------------------------------------------------------+     
void OnDeinit ( const int reason)
  {
   Comment ( "" );
   ChartRedraw ();
  }
//********************************************************************************************************************  
//+------------------------------------------------------------------+  

문제가 있고 작동하지 않습니다.

감사합니다.
파일:
 
TIMisthebest :

ASCtrend(알람 설정).

안녕; 도와주세요.

"ASCtrend" 표시기에 알람을 설정하고 싶습니다.(이전 촛불에 신호가 나타날 때 새 촛불 보내기 알람 시작)

밝은 선을 추가하십시오.

문제가 있고 작동하지 않습니다.

감사합니다.

왜 이것을 사용했습니까?

    if ( BuyBuffer[rates_total- 2 ]!=0 ) 

함수에 코드를 배치합니다.

SendAlert(방향) {...} 또는 이와 유사한

신호가 감지되면 이 함수 를 호출합니다.

         if (Vel>x1)
           {
            value3=high[bar]+Range* 0.5 ;
            SellBuffer[bar]=value3;   
             SendAlert( "sell" );
           }

...

         if (Vel<x2)
           {
            value3=low[bar]-Range* 0.5 ;
            BuyBuffer[bar]=value3;
             SendAlert( "buy" );
           }

 
angevoyageur :

왜 이것을 사용했습니까?

함수에 코드를 배치합니다.

SendAlert(방향) {...} 또는 이와 유사한

신호가 감지되면 이 함수를 호출합니다.

괜찮은.

감사합니다 .

그러나 그 경우 나는 같은 양초에 경고를했고 양초의 끝 (그 양초의 시간)에있을 수 있습니다. " ASCtrend " 신호가 없습니다.

내 말은 : 이전 촛불의 끝에 신호가 있으면 경고를 보냅니다.

"ASCtrend_alarm_2"에서 테스터를 사용하면 { value3 & BuyBuffer & SellBuffer }의 값을 볼 수 있습니다.

2013.04.10부터 2013.04.12까지 무슨 말인지 알 수 있습니다.

내가 틀렸다면 말해주세요.

파일:
 
TIMisthebest :

괜찮은.

감사합니다 .

그러나 그 경우 나는 같은 양초에 경고를했고 양초의 끝 (그 양초의 시간)에있을 수 있습니다. " ASCtrend " 신호가 없습니다.

내 말은 : 이전 촛불의 끝에 신호가 있으면 경고를 보냅니다.

내가 틀렸다면 말해주세요.

당신이 맞습니다. if(bar==1)과 같은 if 문을 추가해야 합니다.
 
angevoyageur :
당신이 맞습니다. if(bar==1)과 같은 if 문을 추가해야 합니다.

아래 그림에서:


" BuyBuffer " 또는 " SellBuffer "의 값이 항상 0인 이유를 이해하지 못합니다.

mql 파일에는 다음이 있습니다.

          if (Vel>x1)
           {
            value3=high[bar]+Range* 0.5 ;
             SellBuffer[bar]=value3;
           }

...
...
...
        if(Vel<x2)
           {
            value3=low[bar]-Range*0.5;
            BuyBuffer[bar]=value3;
           }

테스터에서 확인 가능합니다.(첨부파일)

이것이 항상 0과 같은 이유는 무엇입니까? "value3"이 다른 값을 가질 때?

파일:
 
TIMisthebest :

아래 그림에서:


" BuyBuffer " 또는 " SellBuffer "의 값이 항상 0인 이유를 이해하지 못합니다.

mql 파일에는 다음이 있습니다.

테스터에서 확인 가능합니다.(첨부파일)

이것이 항상 0과 같은 이유는 무엇입니까? "value3"이 다른 값을 가질 때?

나는 이미 당신에게 다음과 같이 말했습니다.

   if ( BuyBuffer[rates_total- 2 ]!=0 ) 

좋지 않다.

다음이 무엇을 의미하는지 아십니까?

 //---- indexing the elements in the buffer as timeseries
   ArraySetAsSeries (BuyBuffer, true );