[Qualsiasi domanda da principiante, per non ingombrare il forum. Professionisti, non passate oltre. Da nessuna parte senza di te - 4. - pagina 253

 
Dimka-novitsek:

Per esprimere il numero di punti, bisogna dividere per Punto. Questa sembra essere una cosiddetta variabile predefinita, che è la dimensione di un singolo punto. Oh, no, no, non è questo. Diciamo che hai un certo valore di prezzo, diciamo 1,2244. Se vuoi aggiungere 5 punti al prezzo, devi scriverlo come 1,2244+(5*Punto), sarà 1,2249. Hai capito?


Ora tutto ha senso, grazie mille!
 

Non posso inserire una funzione nel tacchino. (' - Funzione per determinare C:. \ Ò L'indicatore sperimentale \IndexDiamond mq4 (142, 19)

Cosa gli manca? '(' - definizione di funzione inaspettata C:Òterminalëëë\experts\indicators\ÈäþêÄèìîínà .mq4 (142, 19)

//+------------------------------------------------------------------+
//|                                                 ИндюкДимона .mq4 |
//|                        Copyright 2012, MetaQuotes Software Corp. |
//|                                        http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright 2012, MetaQuotes Software Corp."
#property link      "http://www.metaquotes.net"

#property link      "http://www.metaquotes.net"
#property indicator_chart_window
#property indicator_buffers 3
#property indicator_color1 Green
#property indicator_color2 Red
#property indicator_color3 DarkBlue
#import "user32.dll"
   int   PostMessageA(int  hWnd,int  Msg,int  wParam,string lParam);
#import
#define WM_COMMAND                     0x0111
int delimiter = 0;



double ВерхняячертаBuffer1[];
double НижняячертаBuffer2[];
double СинняячертаBuffer3[];
 double вершина; 
 double основание_первого_снижения;
 double начало;
 double вершина_волны_3;
 extern int T=4,K=200;
 int timeframe, start ;
 int бар_вершина ;
 int бар_основание_первого_снижения;
 int бар_начало;
 int pereklutsatel;
double naklon,linija2; int P;
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()

  {SetIndexStyle(0,DRAW_SECTION,STYLE_SOLID,2,CLR_NONE);//Alert ("SetIndexStyle ",GetLastError( ) );
  SetIndexBuffer(0,ВерхняячертаBuffer1);//Alert ("SetIndexBuffer ",GetLastError( ) );
   SetIndexEmptyValue(0,0.0);
   
   SetIndexStyle(1,DRAW_SECTION,STYLE_SOLID,2,CLR_NONE);//Alert ("SetIndexStyle ",GetLastError( ) );
  SetIndexBuffer(1,НижняячертаBuffer2);//Alert ("SetIndexBuffer ",GetLastError( ) ); 
   SetIndexEmptyValue(1,0.0);
   
   SetIndexStyle(2,DRAW_SECTION,STYLE_SOLID,T,CLR_NONE);//Alert ("SetIndexStyle ",GetLastError( ) );
  SetIndexBuffer(2,СинняячертаBuffer3);//Alert ("SetIndexBuffer ",GetLastError( ) ); 
   SetIndexEmptyValue(2,0.0);
//---- indicators




//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
//----
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {
   int    counted_bars=IndicatorCounted();
   
   for ( int J=0;J<=49;J++){
//----

  // for(int i=Bars; i>=0;i--)
  int i=Bars;
      бар_вершина=iHighest( NULL,  timeframe, MODE_HIGH, K, start ) ;
       вершина =High[ бар_вершина ];
       бар_основание_первого_снижения=iLowest( NULL,  timeframe, MODE_LOW,NormalizeDouble ( бар_вершина/2,0), start ) ;
       основание_первого_снижения=Low[ бар_основание_первого_снижения ];
       бар_начало=iLowest( NULL,  timeframe, MODE_LOW,NormalizeDouble (бар_вершина*1.5,0), бар_вершина ) ;
       начало=Low[ бар_начало ];
       
      //   Alert ( " бар_вершина   ",бар_вершина  , " вершина  " , вершина ,
      //    " бар_основание_первого_снижения  " ,бар_основание_первого_снижения  , " основание_первого_снижения  " , основание_первого_снижения , 
      //    " бар_начало  " , бар_начало   , " начало  " , начало    );
  if(начало>основание_первого_снижения){naklon=(начало-основание_первого_снижения)/(бар_начало-бар_основание_первого_снижения);
 // Alert("naklon  ", naklon);
    НижняячертаBuffer2[бар_начало]=начало;linija2=начало;for(i=бар_начало-1;i>=0;i--){linija2=linija2-naklon;
  //  Alert ("linija2  " , linija2 );
    НижняячертаBuffer2[i]=linija2;
   //  Alert("НижняячертаBuffer2[i]  ", НижняячертаBuffer2[i] , "  i " , i);
   }
    НижняячертаBuffer2[бар_основание_первого_снижения]=основание_первого_снижения;}
    
    
         for (i=0;i<100;i++){  СинняячертаBuffer3[i]= Open[i];}
          for (i=330;i<500;i++){  СинняячертаBuffer3[i]= Open[i];}

     ВерхняячертаBuffer1[бар_начало]=начало;
     
 double точка4; int бар_точка4;   бар_точка4=iHighest( NULL,  timeframe, MODE_HIGH, бар_основание_первого_снижения, 3 ) ; 
  точка4 =High[ бар_точка4 ];  
   
   if(вершина>точка4){naklon=(начало-точка4)/(бар_начало-бар_точка4);  
   double linija1=начало;for(i=бар_начало-1;i>=0;i--){linija1=linija1-naklon;ВерхняячертаBuffer1[i]=linija1; }}
   
 double vulf=НижняячертаBuffer2[0];
  if ( vulf==Ask&&vulf==Bid)vulf=1;
  else{ for (vulf=vulf+Point*10; vulf==НижняячертаBuffer2[0];vulf=vulf-Point){
           if ( vulf==Ask&&vulf==Bid){vulf=1;}} 
      for (vulf=vulf-Point*10; vulf==НижняячертаBuffer2[0];vulf=vulf+Point){
           if ( vulf==Ask&&vulf==Bid)vulf=1;} 
              
           
           
           }
           
           
   if (vulf==1){Comment ("  Есть вульв!!! "  , "  timeframe " , timeframe);return(0);  }
   
   if (vulf!=1&&pereklutsatel==1) {    
   
     if(delimiter<3){delimiter++;Comment(delimiter);return(0);}
   delimiter=0;
    fChangePeriod();P++;
                                 
                   }  
 if (P>8){  K=K+50;return(0);P=0; }    
//----
   return(0);
  }
//+------------------------------------------------------------------+


void fChangePeriod(){int ii,hwd = WindowHandle(Symbol(),Period());
   switch(Period()){
      case PERIOD_W1    : ii = 33134; break; //PERIOD_D1;
      case PERIOD_D1    : ii = 33136; break; //PERIOD_H4;
      case PERIOD_H4    : ii = 33135; break; //PERIOD_H1;
      case PERIOD_H1    : ii = 33140; break; //PERIOD_M30;
      case PERIOD_M30   : ii = 33139; break; //PERIOD_M15;
      case PERIOD_M15   : ii = 33138; break; //PERIOD_M5;
      case PERIOD_M5    : ii = 33137; break; //PERIOD_M1;
      case PERIOD_M1    : ii = 33141; break; //PERIOD_W1;
   }     
   PostMessageA(hwd, WM_COMMAND, ii, 0);
   return;
}
 
Potete dirmi se esiste già un indicatore che calcola l'indice (paniere) delle valute in percentuale?
per esempio da
Euro 37,4
Yen giapponese 9,4
Sterlina 11,3
Dollaro USA 41.9
 

Ciao gente, potreste dire a un principiante come l'indicatore "mikahekin" cambia il buffer visualizzato? E come faccio a far sì che la funzione "Alert" gridi quando la tendenza sta cambiando?

P.S. L'indicatore è qui sotto.

File:
 

Ditemi, è possibile craccare un file con l'estensione ex4, che è sulla password. E cos'altro si può fare oltre alla password scritta nel tutorial Kovalev, in modo che l'esperto non venga violato (se possibile, ovviamente)?

Grazie.

 
Skander:

E cos'altro si può fare oltre alla password scritta nel tutorial di Kovalev per evitare che l'esperto venga violato (se è possibile, ovviamente)?

Lasciateli entrare. Non ha importanza. Nessun Expert Advisor cambierà il mercato, e tutti nel mercato non possono fare soldi, non è possibile.
 
Skander:

Ditemi se è possibile craccare un file con l'estensione ex4 che è sulla password.

è possibile.
 

Salve, professionisti! Per favore consigliatemi, sto testando il Moving Average Expert Advisor, ma dopo il fine settimana il tester dà l'errore 131 volumi sbagliati... ma prima tutto andava bene... Sto testando con una piattaforma di MetaQuotes Software Corp.

 
Zhunko:

Questo script funziona per me:

Questo esperto funziona in modo strano. Si potrebbe dire che non funziona. Accende il TF su se stesso solo fino a M5.

Aspetterò i veri tic. Non capisco come sia apparso il problema. Qualcosa è cambiato nelle nuove build di MT4.

Ho fatto un casino con il codice di Expert Advisor. L'EA in loop commuterà il TF da solo, ma il codice è troppo ingombrante.

Potrebbe essere più semplice. Questo è per coloro che hanno accesso all'aggiornamento autonomo del grafico (funzionerà il sabato e la domenica):

#include <ServicesMT4.mqh>
int g_hwndChart = NULL;
int g_nCounter = 0;

void init()
 {
  g_hwndChart = WindowHandle(Symbol(), Period()); // Получаем системный дескриптор графика.
  if (UninitializeReason() == 0) ServiceRefreshChart(g_hwndChart, 2000); // Запускаем обновление графика каждые 2 секунды.
 }

void deinit()
 {
  if (UninitializeReason() == REASON_REMOVE || UninitializeReason() == REASON_CHARTCLOSE)
   {
    ServiceStopRefreshChart(g_hwndChart); // Останавливаем обновление.
   }
 }

void start()
 {
  ServiceSetTimeframeByNumber(g_hwndChart, g_nCounter % 9);
  g_nCounter++;
  Sleep(2000);
 }
Questo è per coloro che non possono accedere agli aggiornamenti dei grafici offline:
#include <ServicesMT4.mqh>
int g_hwndChart = NULL;
int g_nCounter = 0;

void init()
 {
  g_hwndChart = WindowHandle(Symbol(), Period()); // Получаем системный дескриптор графика.
 }

void start()
 {
  ServiceSetTimeframeByNumber(g_hwndChart, g_nCounter % 9);
  g_nCounter++;
  Sleep(2000);
 }

O come questo:

#include <ServicesMT4.mqh>
int g_nCounter = 0;

void start()
 {
  ServiceSetTimeframeByNumber(WindowHandle(Symbol(),Period()), g_nCounter % 9);
  g_nCounter++;
  Sleep(2000);
 }

Beh, cosa ne pensi, Rustam? Qualcuno qui, negli ultimi 2 giorni, ha mostrato il codice della commutazione TF in Expert Advisor? Pensi di essere un professionista, ma non sei riuscito a capirlo. Non si poteva vedere l'errore in un semplice codice. Ma sei riuscito a lodare lo sviluppo di qualcun altro.

 

Vadim, nessuno mette in dubbio la tua grandezza, intendevo dire che tutto questo può essere fatto con strumenti API più semplici, che è quello con cui l'interrogante ha iniziato, ma invece di spiegare e aiutare, hai portato la conversazione sul tuo argomento come al solito. E le conseguenze non tarderanno ad arrivare.

Per quanto mi riguarda - tutto quello che a me commuta, funziona, sempre, e come dovrebbe:

>
Motivazione: