Errors, bugs, questions - page 2235

 
fxsaber:

How can last-price not be a multiple of TickSize?

maybe, i asked this question a few years ago, i wrote ticks in a while(true) script, i wrote ticks by changing data in "market overview", there were often ticks like 1.3555000001, or 1.3555999999

i was surprised to receive non-normalized price data from the server, i didn't get any answer, but i read later topics and saw the developers' answers saying that some of the ticks are ticks for the terminal and the EA does not trade with such ticks

in your case too, such a price is not a multiple ofSYMBOL_TRADE_TICK_SIZE, which means that you will not trade at such a price.... although it turns out that the Last price analysis may also be meaningless ))))

 
Igor Makanu:

I may have asked this question a few years ago, I wrote ticks in a while(true) script, the ticks were written by changing data in "market overview", there were often ticks like 1.3555000001, or 1.3555999999

Your case is a peculiarity of double -> string conversion. I have a slightly different situation.

 
The EA log is 15 GB. Attempting to view it in the Terminal causes it to hang for more than a minute.
 
fxsaber:
The EA log is 15 GB. Attempting to view it in the Terminal causes it to hang for more than a minute.

What do you want it to be?

 
Alexey Kozitsyn:

Do you want it to be like this?

In case of a big log, issue a warning about it first and ask if you want to continue or not.

 
fxsaber:

In the case of a big log, to give a warning about it first and ask if you want to continue or not.

See how immediately constructive it became:)

 
Alexey Viktorov:

Your mistake is that after writing to a file, the data only gets to the disk after FileClose OR after a forced reset of the data to the disk by FileFlush

Otherwise how can you read a file that doesn't exist???

You have me confused with someone else. Both with and without FileFlush - the error is the same. The real Expert Advisor, where everything started, initially has both FileFlush and the file itself.

The FILE_SHARE_WRITE flag in such a combination seems to work, but another question arises: what is the point of such an entry? Logically, if you enable write separation, you need to add it exactly to the write flag:

FILE_READ|FILE_BIN|FILE_SHARE_READ|(writing?(FILE_WRITE|FILE_SHARE_WRITE):0)

That's exactly what I tried, and it gives an error too.

 
In general, it's not clear why I have to check a file for writing, when only read separation is required?
 
Gentlemen, can anyone help me with this question?
 

TheMqlTradeCheckResult tooltip does not pop up in ME

#define  TOSTRING(A)  #A + " = " + (string)(A) + "\n"
#define  TOSTRING2(A) #A + " = " + EnumToString(A) + " (" + (string)(A) + ")\n"

string ToString( const MqlTradeRequest &Request )
{
  return(TOSTRING2(Request.action) + TOSTRING(Request.magic) + TOSTRING(Request.order) +
         TOSTRING(Request.symbol) + TOSTRING(Request.volume) + TOSTRING(Request.price) +
         TOSTRING(Request.stoplimit) + TOSTRING(Request.sl) +  TOSTRING(Request.tp) +
         TOSTRING(Request.deviation) + TOSTRING2(Request.type) + TOSTRING2(Request.type_filling) +
         TOSTRING2(Request.type_time) + TOSTRING(Request.expiration) + TOSTRING(Request.comment) +
         TOSTRING(Request.position) + TOSTRING(Request.position_by));
}

string ToString( const MqlTradeResult &Result )
{
  return(TOSTRING(Result.retcode) + TOSTRING(Result.deal) + TOSTRING(Result.order) +
         TOSTRING(Result.volume) + TOSTRING(Result.price) + TOSTRING(Result.bid) +
         TOSTRING(Result.ask) + TOSTRING(Result.comment) + TOSTRING(Result.request_id) +
         TOSTRING(Result.retcode_external));
}

string ToString( const MqlTrade
Reason: