Questions from Beginners MQL4 MT4 MetaTrader 4 - page 109

 
Mickey Moose Set them here.
Magic=0; this is magic number 0 or the lack of it.
extern differs from input
terminal cannot be started - the terminal generates an initialization error 2 or initialization error 4
what is the reason and what is the solution
and last - build a Renco chart
iMA is somehow not equal to the rentco cube data array

1. How to check: Open order from script with magic=0. Hover your cursor over the order. A popup will tell you everything.

2. Write .

extern int x=1;
input  int y=2;

void start()
{
  x=2;
  y=1;
}

Start the compilation, MetaEditor will show you what you need to do.

3. Copy the folder under a different name. Remove everything from the Experts folder. Still an error? Remove everything from the Indicators folder Did it help? Here we go...

 
STARIJ:

1. How to check: Open order from script with magic=0. Hover your cursor over the order. A popup will tell you everything.

2. Write .

Start the compilation, MetaEditor will explain you what to do.

3. Copy the folder under a different name. Remove everything from the Experts folder. Still an error? Remove everything from the Indicators folder Did it help? Here we go...


Theoretically it is clear.

next. I was sitting yesterday writing and writing, and then I got tired and blundered in MetaEditor - the upper panel with names of EAs has disappeared

There is this line with their names for switching. How do I get it back?

 
Mickey Moose: this is the line to switch with their names to switch. How do I get it back?

Window --> Cascade

 
STARIJ:

Window --> Cascade


It worked, thank you.

 
Mickey Moose:

and the last one is to build a wristwatch from a Renco graph

as if the iMA parameter is not equal to the array of data from the Renco cube

MovingAverages.mqh file in \Include

//+------------------------------------------------------------------+
//| Simple Moving Average                                            |
//+------------------------------------------------------------------+
double SimpleMA(const int position,const int period,const double &price[])
  {
//---
   double result=0.0;
//--- check position
   if(position>=period-1 && period>0)
     {
      //--- calculate value
      for(int i=0;i<period;i++) result+=price[position-i];
      result/=period;
     }
//---
   return(result);
  }
 
Taras Slobodyanik:

MovingAverages.mqh file in \Include


Thanks, I'll think about what to do with it, although I've never used these files or libraries in my life. I don't see any use for them in this field.


STARIJ:


3. Copy the folder under a different name. Remove everything from the Experts folder. Still an error? Remove everything from the Indicators folder Did it help? Here we go...


So, what is the reason behind it?

 
Mickey Moose: So what is the cause itself?

One of the indicators or experts is dead. To find out which one you need to remove one by one from the folder

 
STARIJ:

One of the indicators or Expert Advisors has died. To find out which one one to delete from the folder one by one


strange) I treat it by clearing the cache, or a blue screen afterwards


By the way what do you think about this chip?

void function

long time_current=(long)TimeCurrent();

if (time_current>= desired date)

{

here we open an infinite number of orders at 0.01 lots

}




Happy Holidays to all who read this branch and help with various problems!

 
Mickey Moose:
By the way, what do you think of this trick?
void function
long time_current=(long)TimeCurrent();
if (time_current>= desired date)
{
here we open an infinite number of orders at 0.01 lots
}
Happy holidays to all who read this branch and help with various problems!

I think the following: 1) time_current=TimeCurrent () is better; and 2) why do we open here an infinite number of orders at 0.01 lots?

 
STARIJ:

I think the following: 1) time_current=TimeCurrent (); and 2) why do we need to open an infinite number of orders at 0.01 lots?


1) I do not want to get into the metaeditor and see how it is recorded correctly.

2) I may open large ones - for the entire deposit and immediately close them, or some other tricks, the meaning has not changed

Reason: