MQL4 및 MQL5에 대한 초보자 질문, 알고리즘 및 코드에 대한 도움말 및 토론 - 페이지 1449

 

Vitaly Muzichenko :

SmoothedMAOnBuffer() 함수 로 작업하는 예가 필요합니다.  

일반적으로 다음과 같습니다.

 //+------------------------------------------------------------------+
//|                                                       VMTest.mqh |
//|                        Copyright 2021, MetaQuotes Software Corp. |
//|                             https://mql5.com/ru/users/artmedia70 |
//+------------------------------------------------------------------+
#property copyright "Copyright 2021, MetaQuotes Software Corp."
#property link        "https://mql5.com/ru/users/artmedia70"
#property version    "2.00"
#property strict
#property indicator_separate_window
#ifdef __MQL5__
   #property indicator_buffers 2
   #property indicator_plots    2
#else
   #property indicator_buffers 2
#endif
#property indicator_color1 clrLime
#property indicator_type1 DRAW_LINE
#property indicator_width1 2
#property indicator_color2 clrRed
#property indicator_type2 DRAW_LINE
#property indicator_width2 2

double BufferHL[];
double BufferSMMA[];

sinput int InpPeriod = 5 ;   // Smoothing period
int     period_smma;

#include <MovingAverages.mqh>
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int OnInit ()
  {
   #ifdef __MQL4__ IndicatorBuffers( 2 ); #endif
   SetIndexBuffer ( 0 ,BufferHL, INDICATOR_DATA );
   SetIndexBuffer ( 1 ,BufferSMMA, INDICATOR_DATA );
   ArraySetAsSeries (BufferHL, true );
   ArraySetAsSeries (BufferSMMA, true );
   period_smma=(InpPeriod< 2 ? 2 : InpPeriod);
   return ( INIT_SUCCEEDED );
  }
//+------------------------------------------------------------------+
//| 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[])
  {
   int limit=rates_total-prev_calculated;
   if (limit> 1 )
     {
      limit=rates_total- 1 ;
       ArrayInitialize (BufferHL, EMPTY_VALUE );
       ArrayInitialize (BufferSMMA, EMPTY_VALUE );
     }
   for ( int i=limit;i> WRONG_VALUE ;i--)
     {
      BufferHL[i]=high[i]-low[i];
     }
   if (SmoothedMAOnBuffer(rates_total,prev_calculated, 0 ,period_smma,BufferHL,BufferSMMA)== 0 )
       return 0 ;
   return (rates_total);
  }
//+------------------------------------------------------------------+
 
안녕하세요. 차트의 텍스트 양을 늘리려면 어떻게 해야 합니까? 현재 하루에 24개의 텍스트를 표시합니다.
   void Vr(){
   double h = TimeHour( TimeCurrent ()); 
           ObjectCreate ( 0 , "Vr" +h, OBJ_TEXT , 1 , TimeCurrent (), 0 );    
           double Vr0=ObjectDescription( "Vr" +h);   
           ObjectSetText( "Vr" +h, MathMin (balance[ 0 ],Vr0), 20 , "Arial" , clrWhite );
           ObjectSetInteger ( 0 , "Vr" +h, OBJPROP_ANCHOR , ANCHOR_RIGHT );
       Comment (Vr0);    }  
나는 분 차트의 지표를 사용합니다. 텍스트는 한 시간에 한 번 표시됩니다.
 

MQL5 클라우드 프로텍터 클릭 시 오류 팝업

sending request to protector server error ( 3 - 3 , # 0 )             0        0

파일 자체는 문제 없이 컴파일됩니다. 무엇이 잘못되었을 수 있습니까?

[삭제]  
Sergey Likho :

MQL5 클라우드 프로텍터 클릭 시 오류 팝업

파일 자체는 문제 없이 컴파일됩니다. 무엇이 잘못되었을 수 있습니까?

Google 메시지: 트레드 서버에 요청을 보내는 동안 오류가 발생 했습니다.

 
Artyom Trishkin :

일반적으로 다음과 같습니다.

고맙습니다!

 
Vitaly Muzichenko :

고맙습니다!

별말씀을요 ;)

상위 5위 안에 드는 리메이크 방법을 보여드릴 수 있습니다. 거기에 모든 얼음이 있는 것은 아닙니다...

 
Artyom Trishkin :

별말씀을요 ;)

상위 5위 안에 드는 리메이크 방법을 보여드릴 수 있습니다 . 거기에 모든 얼음이 있는 것은 아닙니다...

런칭한적도 없고...

원래 형태로 있었다면 좋았을 것입니다.

이것은 "플러그"로 밝혀진 현재까지 유일한 지표입니다.

파일:
max.mq5  12 kb
 
Vitaly Muzichenko :

런칭한 적 없는데...

원래 형태로 있었다면 좋았을 것입니다.

이것은 "플러그"로 밝혀진 현재까지 유일한 지표입니다.

이 표시기의 완전히 작동하는 원래 코드를 4개에 정확히 제공하십시오. 5개 할게요

 
Artyom Trishkin :

이 표시기의 완전히 작동하는 원래 코드를 4개에 정확히 제공하십시오. 5개 할게요

원래 어둠 속에서 수정되었습니다.

PS Dot.mq4 - 전체 원본

파일:
test.mq4  17 kb
Dot.mq4  8 kb
 
Vitaly Muzichenko :

원래 어둠 속에서 수정되었습니다.

PS Dot.mq4 - 전체 원본

좋은. 그러나 나는 여가 시간에만 볼 수 있습니다 - 직장, 집, 가족, 고양이 및 자녀 / 손자 ... 시어머니, 예 ...