Errors, bugs, questions - page 1553

 

MQL4. CharArrayToString(), for the 3rd argument count it says that " .Defaults to -1, which means copying to the end of the array, or meeting the terminal 0." In MetaEditor 4, the prompt "int count=WHOLE_ARRAY" appears. On the site, go to WHOLE_ARRAY, where the numeric value of this constant = 0.

Maybe in the CharArrayToString() documentation for this argument just leave ". Defaults to 0."?

 
Maxim Khrolenko:

MQL4. CharArrayToString(), for the 3rd argument count it says that " .Defaults to -1, which means copying to the end of the array, or meeting terminal 0." In MetaEditor 4, the prompt "int count=WHOLE_ARRAY" appears. On the site, we go to WHOLE_ARRAY, where the numeric value of this constant = 0.

Maybe in the CharArrayToString() documentation we should leave just "..." for this argument. The default is 0."?

Unfortunately, in the new quad, we are pulling the legacy from the old quad.

So you can specify both 0 and -1 as this parameter in the four function CharArrayToString. The result will be the same

 

Good afternoon All!)

This is a question for a dummy in programming...

I am trying to compile an EA for a new build and the compiler gives me lots of different errors...

Here is one of them

if(oppositedelete){delete( OP_SELLSTOP);delete( OP_SELLLIMIT);}

There are 2 errors marked in red in this code fragment: '(' - object pointer expected

Having read a bit about the subject of the error, I understood that the name is reserved and I must replace it...

So the question is what to replace it with?


 
Anton Razmyslov:

Good afternoon All!)

This is a question for a dummy in programming...

I am trying to compile an EA for a new build. The compiler gives me lots of different errors...

Here is one of them

if(oppositedelete){delete( OP_SELLSTOP);delete( OP_SELLLIMIT);}

There are 2 errors marked in red in this code fragment: '(' - object pointer expected

Having read a bit about the subject of the error, I understood that the name is reserved and I must replace it...

So the question is what to replace it with?


For instance, I can replace it with DELETE but in general it is helpful to read the help... There is a lot of information there... Especially at the beginning, middle and end of....
 
Anton Razmyslov:

Good afternoon All!)

This is a question for a dummy in programming...

I am trying to compile an EA for a new build and the compiler gives me lots of different errors...

Here is one of them

if(oppositedelete){delete( OP_SELLSTOP);delete( OP_SELLLIMIT);}

There are 2 errors marked in red in this code fragment: '(' - object pointer expected

Having read a bit about the subject of the error, I understood that the name is reserved and I must replace it...

So the question is what to replace it with?


Mql is case sensitive. You can capitalize the initial letter, for example.
 
Anton Razmyslov:

Good afternoon All!)

This is a question for a dummy in programming...

I am trying to compile an EA for a new build and the compiler gives me lots of different errors...

Here is one of them

if(oppositedelete){delete( OP_SELLSTOP);delete( OP_SELLLIMIT);}

There are 2 errors marked in red in this code fragment: '(' - object pointer expected

Having read a bit about the subject of the error, I understood that the name is reserved and I must replace it...

So the question is what to replace it with?


The question is like "How do I name my son, if Vasya is not allowed? )

What difference does it make what to replace the name of this function with? To any other name. Even to Petya().

 
How can I change the properties similar toCHART_SHOW_DATE_SCALE and CHART_SHOW_PRICE_SCALE constants in the terminal interface (MT4)? I have not found anything similar in the chart properties dialog box.
 
MQL4, ColorToString(): the second argument bool color_name could be written as bool color_name=false, as in ME4 hint. And in the "Parameters" paragraph for color_name, you could add "Defaults to false"at the end.
 

Since I didn't get an answer in the other thread, I'll repeat the question here, maybe this will help

"

Can you please tell me what my mistake is.

for(int i=0;i<N_Sell;i++) printf("OpenSellTime[%d] = %G",i,TimeToString(OpenSellTime[i],TIME_DATE|TIME_MINUTES)," PriceOpenSell[%d] = %G",i,PriceOpenSell[i]);

The date from OpenSellTime array is not printed and not the second part of expression - PriceOpenSell.

And, can't find aboutprintf commandslike%G and%d.

"

 
-Aleks-:

Since I didn't get an answer in the other thread, I'll repeat the question here, maybe this will help

"

Can you please tell me what my mistake is.

for(int i=0;i<N_Sell;i++) printf("OpenSellTime[%d] = %G",i,TimeToString(OpenSellTime[i],TIME_DATE|TIME_MINUTES)," PriceOpenSell[%d] = %G",i,PriceOpenSell[i]);

The date from OpenSellTime array is not printed and not the second part of expression - PriceOpenSell.

And, can't find aboutprintf commandslike%G and%d.

"

https://www.mql5.com/ru/docs/common/printformat
Документация по MQL5: Общие функции / PrintFormat
Документация по MQL5: Общие функции / PrintFormat
  • www.mql5.com
Общие функции / PrintFormat - справочник по языку алгоритмического/автоматического трейдинга для MetaTrader 5
Reason: