Log4mql(mini) requires only one input field. There is no logging to files.
The message pattern will have a fixed format which corresponds to its appropriate severity level, according to below table.
Severity | Format | Sample output |
---|---|---|
Info (the commonly used default) | %func: %msg | OnInit: Log level: TRACE |
Debug, Trace | %func(%file:%line): %msg | OnInit(log4mqlm_sample.mq4:72): initializing |
Warn | WARN %func(%file:%line): %msg | WARN SomeFunction(log4mqlm_sample.mq4:64): stoploss too tight |
Error | ERROR %func(%file:%line): %msg optionally followed by: [, error %lasterr - %lasterrdesc] | ERROR OnDeinit(log4mqlm_sample.mq4:85): open 'some file' failed, error 5004 - Cannot open file |
Fatal | FATAL ... as above | FATAL ... |
Log4mql(mini) provides functions and preprocessor macros for logging, all macros are to be used like functions.
Return type | Function name | Description |
---|---|---|
bool | PRINT (...) | Prints its message if log level is set at least to INFO (= normal logging behavior). Supports up to 9 arguments - PRINT("1",2,etc) - if you need more, expand the templates. Returns true if message was logged, else false. |
bool | PRINTF (string format,...) | Like PRINT but prints a formatted message. Same rules as known from PrintFormat apply. |
bool | WARN (...) WARNF (string format,...) | Prints its message if log level is set at least to WARN. |
bool | ERROR (...) ERRORF (string format,...) | Prints its message if log level is at least ERROR. Adds _LastError description if set. |
bool | FATAL (...) FATALF (string format,...) | Like ERROR, but with termination. You should call ExpertRemove() or exit immediately otherwise after this. Example: if(step<MinStep) { FATALF("invalid step size: %f",step); ExpertRemove(); return; } |
bool | DEBUG (...) DEBUGF (string format,...) | Messages for DEBUG level. |
bool | TRACE (...) TRACEF (string format,...) | Messages for TRACE (more verbose than DEBUG, for function entries, calculations etc). |
string | L4mq.LastMessage() | Get the last message that has been logged. |
int | L4mq.LastLevel() | Get the severity level of the last logging event. |
int | L4mq.Level() | Get the severity level of the logger. |
string | L4mq.LevelAsString() | Get the severity level of the logger as string. |
void | L4mq.SetLevel(int) | Set the severity level for the logger. |
ulong | L4mq.SeqNr() | Get the sequence number of the last logged event. |
bool | L4mq.logged | true if the last event was logged. |
string | Log4mql::GetErrorDescription(int err) | Get the description of an error code like _LastError. |
string | Log4mql::GetUninitReason(int reason) | Get the description of the uninit reason. |
string | Log4mql::LoglevelToString(int level) | Convert a log level to a descriptive string. |
Corrected moving averages
Painel multi moedas basedado em RSI, CCI, MMA, Forçade preço
Colored volumes at the bottom of the chart
The breakout strength meter is a trading tool that is used to identify which currencies are the strongest to breakout, and which currencies are the weakest to breakout