Errors, bugs, questions - page 1820
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
...
void OnTick(){
Comment(Somevalue);
}
The MQL5 program prints the comment:"1487811600"
Why does it happen? How to output the correct string value?
Look for an error. Or post full reproducible code. Check code
//| Test.mql5 |
//| Copyright 2017, CompanyName |
//| http://www.companyname.net |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2017, Vladimir Karputov"
#property link "http://wmua.ru/slesar/"
#property version "1.00"
#property script_show_inputs
//--- input parameters
input string Somevalue="Maxim";
//+------------------------------------------------------------------+
//| Script program start function |
//+------------------------------------------------------------------+
void OnStart()
{
Comment(Somevalue);
}
//+------------------------------------------------------------------+
does not reproduce the error.
I also recommend that you replace Comment with Print - there is a chance that another program will trivially overwrite the comment on the chart.
restarted the EA on a different chart, it worked correctly. That's weird. But thanks for the help.
Who understands the answer, please explain. I still don't understand why OrderSend is considered normal
As far as I understand, OrderSend only waits until the order is queued for processing on the server, but not until the result of processing.
There is an OrderSend-bug reproducing script in the application. It runs through the Market Watch and opens BuyLimit at every symbol. After that it immediately tries to modify it (sets TP) and then delete it. If modification or deletion of the order is impossible, the script stops with a corresponding message.
Everything is done via synchronous OrderSend. And almost immediately we come across a situation where, after a successful OrderSend (setting BuyLimit), nothing can be done (modify or delete) with the pending order.
Operating result
2017.02.23 14:24:49.828 OrderSend-StartedBug (Si-3.17,M1) DeleteError GetLastError() = 4756 EnumToString((ENUM_ORDER_STATE)OrderGetInteger(ORDER_STATE)) = ORDER_STATE_STARTED
Dear developers, is this a bug OrderSend or not?
SZZ, however, OrderSend at TRADE_ACTION_DEAL doesn't terminate as long as the corresponding order has STARTED status.
All the fun of the script can be experienced slowly on the FXOpen-MT5 server.
when aposition is successfullyopened by a market order, a zero Result.deal is obtained every time?
Error in OpenCL initialization. Error code=5101