cannot execute met editor code in meta trader by sequence

 

hello every all Please can help me Please
When i work in demo to create Expert Advisor and connect to the meta trader can not read all codes for mql5 read only last step!!! Can solve this problem Please

i create code by use meta trader

for example 

void OnTick()

  {

//---

   double open = iOpen(_Symbol, PERIOD_CURRENT, 0);

   double close = iClose(_Symbol, PERIOD_CURRENT, 0);

   double high = iHigh(_Symbol, PERIOD_CURRENT, 0);

   double low = iLow(_Symbol, PERIOD_CURRENT, 0);

   Comment("open "  +open);

    Comment("close "  +close);

     Comment("high "  +high);

      Comment("low "  +low);

  }

when i connect in the meta trader 

execute only        Comment("low "  +low);

last step 

Create Your Own Expert Advisor in MQL5 Wizard
Create Your Own Expert Advisor in MQL5 Wizard
  • www.mql5.com
The knowledge of programming languages is no longer a prerequisite for creating trading robots. Earlier lack of programming skills was an impassable obstacle to the implementation of one's own trading strategies, but with the emergence of the MQL5 Wizard, the situation radically changed. Novice traders can stop worrying because of the lack of programming experience - with the new Wizard, which allows you to generate Expert Advisor code, it is not necessary.
 
Your post is unintelligible. Try again to explain your issue.
 

Alain Verleyen #:
Your post is unintelligible. Try again to explain your issue.

ok sir 

i create code by use meta trader

for example 

void OnTick()

  {

//---

   double open = iOpen(_Symbol, PERIOD_CURRENT, 0);

   double close = iClose(_Symbol, PERIOD_CURRENT, 0);

   double high = iHigh(_Symbol, PERIOD_CURRENT, 0);

   double low = iLow(_Symbol, PERIOD_CURRENT, 0);

   Comment("open "  +open);

    Comment("close "  +close);

     Comment("high "  +high);

      Comment("low "  +low);

  }

when i connect in the meta trader 

execute only        Comment("low "  +low);

last stpe

 

Please EDIT your post and use the CODE button (Alt-S) when inserting code.

Code button in editor

Hover your mouse over your post and select "edit" ... 


This time I did it for you.
 

i create code by use meta trader

for example 

void OnTick()

  {

//---

   double open = iOpen(_Symbol, PERIOD_CURRENT, 0);

   double close = iClose(_Symbol, PERIOD_CURRENT, 0);

   double high = iHigh(_Symbol, PERIOD_CURRENT, 0);

   double low = iLow(_Symbol, PERIOD_CURRENT, 0);

   Comment("open "  +open);

    Comment("close "  +close);

     Comment("high "  +high);

      Comment("low "  +low);

  }

when i connect in the meta trader 

execute only        Comment("low "  +low);

last step

 
  1. Don't double post! You already had this thread open.
              General rules and best pratices of the Forum. - General - MQL5 programming forum #6 (2017)

  2. Db Orc #: execute only        Comment("low "  +low);

    Wrong, it executed all of them. Each replacing the previous.
              How to place comments in a row? - MQL4 programming forum (2022)


 
Db Orc #:
void OnTick()

  {
   double open = iOpen(_Symbol, PERIOD_CURRENT, 0);
   double close = iClose(_Symbol, PERIOD_CURRENT, 0);
   double high = iHigh(_Symbol, PERIOD_CURRENT, 0);
   double low = iLow(_Symbol, PERIOD_CURRENT, 0);
   Comment("open : "  + DoubleToString(open, _Digits), "\n",
           "close : "  + DoubleToString(close, _Digits), "\n",
           "high : "  + DoubleToString(high, _Digits), "\n",
           "low : "  + DoubleToString(low, _Digits));
  }

Comment

This function outputs a comment defined by a user in the top left corner of a chart.

void  Comment(
   argument,     // first value
   ...           // next values
   );

Parameters

...

[in]   Any values, separated by commas. To delimit output information into several lines, a line break symbol "\n" or "\r\n" is used. Number of parameters cannot exceed 64. Total length of the input comment (including invisible symbols) cannot exceed 2045 characters (excess symbols will be cut out during output).

Return Value

No return value

Note

Arrays can't be passed to the Comment() function. Arrays must be entered element-by-element.

Data of double type are output with the accuracy of up to 16 digits after a decimal point, and can be output either in traditional or in scientific format, depending on what notation will be more compact. Data of float type are output with 5 digits after a decimal point. To output real numbers with another accuracy or in a predefined format, use the DoubleToString() function.

Data of bool type are output as "true" or "false" strings. Dates are shown as YYYY.MM.DD HH:MI:SS. To show dates in another format, use the TimeToString() function. Data of color type are output either as R,G,B string or as a color name, if this color is present in the color set.

Comment() function does not work during optimization in the Strategy Tester.

Example:

void OnTick()
  {
//---
   double Ask,Bid;
   int Spread;
   Ask=SymbolInfoDouble(Symbol(),SYMBOL_ASK);
   Bid=SymbolInfoDouble(Symbol(),SYMBOL_BID);
   Spread=SymbolInfoInteger(Symbol(),SYMBOL_SPREAD);
//--- Output values in three lines
   Comment(StringFormat("Show prices\nAsk = %G\nBid = %G\nSpread = %d",Ask,Bid,Spread));
  }
 

Miguel Angel Vico Alba #:



Comment

This function outputs a comment defined by a user in the top left corner of a chart.


Parameters

...

[in]   Any values, separated by commas. To delimit output information into several lines, a line break symbol "\n" or "\r\n" is used. Number of parameters cannot exceed 64. Total length of the input comment (including invisible symbols) cannot exceed 2045 characters (excess symbols will be cut out during output).

Return Value

No return value

Note

Arrays can't be passed to the Comment() function. Arrays must be entered element-by-element.

Data of double type are output with the accuracy of up to 16 digits after a decimal point, and can be output either in traditional or in scientific format, depending on what notation will be more compact. Data of float type are output with 5 digits after a decimal point. To output real numbers with another accuracy or in a predefined format, use the DoubleToString() function.

Data of bool type are output as "true" or "false" strings. Dates are shown as YYYY.MM.DD HH:MI:SS. To show dates in another format, use the TimeToString() function. Data of color type are output either as R,G,B string or as a color name, if this color is present in the color set.

Comment() function does not work during optimization in the Strategy Tester.

Example:

Thank you very much for the answer. I worked with your answer and it worked. I am grateful to you for helping me