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.
Hover your mouse over your post and select "edit" ...
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
-
Don't double post! You already had this thread open.
General rules and best pratices of the Forum. - General - MQL5 programming forum #6 (2017) -
Wrong, it executed all of them. Each replacing the previous.
How to place comments in a row? - MQL4 programming forum (2022)
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
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
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
when i connect in the meta trader
execute only Comment("low " +low);
last step