Questions from Beginners MQL4 MT4 MetaTrader 4 - page 152

 
IJoy:
My problem is not with spyware, but with the aim of getting a deposit bonus for me and my sister, as I will be working from the same computer. So I wish the broker wouldn't block the accounts.

In that case, it will help you to open accounts from different browsers. Let one of the browsers work through a VPN.
 
Alexandr Saprykin:
Do you have a terminal installed on your computer or do you use a web terminal?

Web terminal

 
Basik72 Байсалов:

Web terminal

So you have to download the mt4 terminal from your broker's website and install it on your computer.

 
IJoy:
My problem is not spymania, but to get a deposit bonus for me and my sister, as I will be working from the same computer. I would like the broker not to block the accounts.

If their IP is grey, they will not have any problems at all. You may have a huge number of different subscribers on one white IP. If you have a dynamic white, you just need to update your connection to change the IP. In case of permanent white you may have variants with IP substitution.
The most common fixation is by IP address.

 
Artsem:

Ihor Herasko is a great performer! : )

Would he be so gracious and lenient as to stop reading my old posts, which I corrected long ago, and start with yesterday's?

spsb!

Can we stop multiplying the same posts in all threads? If you want to talk to Igor, write to him.

 
ponochka:

I would like to understand whatStartHour andEndHour mean???

i need a function to prohibit trading with and by.... will this do?

What doesHour,Start,End mean in translation?

If you don't know, you can use any translator.

 
Good day to all! Please explain me, if you don't mind, where is the alternative to the OnDeinit function of previous versions of MQL4 in the section of creating a custom indicator of the modern editor. Where and how to prescribe the removal of all indicator objects after the removal of the indicator itself? I don't want to explain how much time it took me to find this information. Thank you for your attention!
 

Good time, help to solve the problem with the code in these two errors. The first one is unclear: 'Max1' - parameter conversion not allowed prob.mq4 33 15

How to correctly specify to save the extremum data to an array for all indexes?

Second error: 'high' - undeclared identifier prob.mq4 40 44

No access for the function, somehow OHLC should be duplicated correctly?


//+------------------------------------------------------------------+
//|                                                         prob.mq4 |
//|                        Copyright 2018, MetaQuotes Software Corp. |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2018, MetaQuotes Software Corp."
#property link      "https://www.mql5.com"
#property version   "1.00"
#property strict
#property indicator_chart_window
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
double Max1[100],Min1[100];
double Max2[100],Min2[100];
int Str,ff,ii;

//+------------------------------------------------------------------+
//| 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[])
  {
//---
  FindMaxMin1(Max1[11],Min1[11],Max1[12],Min1[12],Max1[13],Min1[13],Max1[14],Min1[14],Str,ff,ii); 
//--- return value of prev_calculated for next call
   return(rates_total);
  }
//+------------------------------------------------------------------+
void FindMaxMin1(double &max11[], double &min11[],double &max12[], double &min12[],double &max13[], double &min13[],double &max14[], double &min14[],int Stroka, int f,int i)
  { 
  min11[1+Stroka]=MathMin(min11[1+Stroka], high[i+f+1]-high[i+f+0]);
  max11[1+Stroka]=MathMax(max11[1+Stroka], high[i+f+1]-high[i+f+0]);
  
  min12[2+Stroka]=MathMin(min12[2+Stroka], high[i+f+0]-high[i+0]);
  max12[2+Stroka]=MathMax(max12[2+Stroka], high[i+f+0]-high[i+0]);
  
  min13[3+Stroka]=MathMin(min13[3+Stroka], low[i+f+1]-low[i+f+0]);
  max13[3+Stroka]=MathMax(max13[3+Stroka], low[i+f+1]-low[i+f+0]);  
  
  min14[4+Stroka]=MathMin(min14[4+Stroka], low[i+f+0]-low[i+0]);
  max14[4+Stroka]=MathMax(max14[4+Stroka], low[i+f+0]-low[i+0]);  
  }

 
mwwm:

Good afternoon, can you help me solve the problem with the code in these two errors. The first one is unclear: 'Max1' - parameter conversion not allowed prob.mq4 33 15

How to correctly specify to save the extremum data to an array for all indexes?

Second error: 'high' - undeclared identifier prob.mq4 40 44

No access for the function, somehow OHLC must be duplicated correctly?



'Max1' - parameter conversion not allowed

You are trying to pass a reference to an array! Why are you passing an array element number?

FindMaxMin1(Max1,Min1,Max1,Min1,Max1,Min1,Max1,Min1,Str,ff,ii); 

Or pass the values into the function, not a reference to the array. I don't understand what I want at all.

'high' - undeclared identifier

says it does not know such an array.


That is something like this:

//+------------------------------------------------------------------+
//|                                                      ProjectName |
//|                                      Copyright 2012, CompanyName |
//|                                       http://www.companyname.net |
//+------------------------------------------------------------------+
#property copyright "Copyright 2018, MetaQuotes Software Corp."
#property link      "https://www.mql5.com"
#property version   "1.00"
#property strict
#property indicator_chart_window
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
double Max1[100],Min1[100];
double Hhigh[100],Llow[100];
int Str,ff,ii;
//+------------------------------------------------------------------+
//| 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[])
  {
//---
   ArrayCopy(Hhigh,high,0,0,100);
   ArrayCopy(Llow,low,0,0,100);
   FindMaxMin1(Max1,Min1,Hhigh[11],Llow[11],Hhigh[12],Llow[12],Hhigh[13],Llow[13],Hhigh[14],Llow[14],Str,ff,ii);
//--- return value of prev_calculated for next call
   return(rates_total);
  }
//+------------------------------------------------------------------+
void FindMaxMin1(double &max1[],double &min1[],double max11,double min11,double max12,double min12,double max13,double min13,double max14,double min14,int Stroka,int f,int i)
  {
   min1[1+Stroka]=MathMin(min1[1+Stroka], Hhigh[i+f+1]-Hhigh[i+f+0]);
   max1[1+Stroka]=MathMax(max1[1+Stroka], Hhigh[i+f+1]-Hhigh[i+f+0]);

   min1[2+Stroka]=MathMin(min1[2+Stroka], Hhigh[i+f+0]-Hhigh[i+0]);
   max1[2+Stroka]=MathMax(max1[2+Stroka], Hhigh[i+f+0]-Hhigh[i+0]);

   min1[3+Stroka]=MathMin(min1[3+Stroka], Llow[i+f+1]-Llow[i+f+0]);
   max1[3+Stroka]=MathMax(max1[3+Stroka], Llow[i+f+1]-Llow[i+f+0]);

   min1[4+Stroka]=MathMin(min1[4+Stroka], Llow[i+f+0]-Llow[i+0]);
   max1[4+Stroka]=MathMax(max1[4+Stroka], Llow[i+f+0]-Llow[i+0]);
  }
//+------------------------------------------------------------------+



You'll have to figure out the rest according to your task.

All in all, it's not clear what it should do...

 
Vladislav Andruschenko:

Max1' - parameter conversion not allowed.

You are trying to pass a reference to an array! Why are you passing an array element number?

Or pass values into a function instead of an array reference. I don't understand what I wanted at all.


I wanted to store values in FindMaxMin1(Max1[11],Min1[11],Max1[12],Min1[12],Max1[13],Min1[13],Max1[14],Min1[14],Str,ff,ii);
.

and pass it to a function for processing, an unsuccessful attempt to save variable names for functions.

Reason: