amrali
Codes
xoshiro256 Random Number Generator for MetaTrader 5
The 64-bit xoshiro256** Random Number Generator
Introsort (Introspective sort) for MetaTrader 5
Sort the input array in-place using comparison function less
Radix sort (The fastest numeric sort) for MetaTrader 5
Sorts the values in the first dimension of a multidimensional numeric array in the ascending order
String Manipulation Functions for MetaTrader 5
A collection of useful string manipulation functions
MultiSort - sorting algorithm for MetaTrader 5
A sorter class to sort an array based on other arrays
Print Closed Position for MetaTrader 5
Print info about a closed position by its position ticket or identifier
Forex Calculators for MetaTrader 5
Margin Calculator, Point Value Calculator, Position Size Calculator, Profit Calculator and Swap Calculator
Currency Strength Index (CSI) for MetaTrader 5
Trading the STRONG against the weak
Forex_Spread_Meter for MetaTrader 5
MetaTrader 5 indicator that displays the spread meter on the chart
Daylight changes (summer time) for MetaTrader 5
Compute the daylight saving time changes (start/end of the summer time)
Forum
Serious bug in the OrderCalcProfit() function
According to the documentation of OrderCalcProfit , "The function calculates the profit for the current account, in the current market conditions, based on the parameters passed. The function is used for pre-evaluation of the result of a trade operation. The value is returned in the account
Bug in MetaEditor Build 3566: Wrong display of double floating point numbers in the debugger window
I am attaching a screenshot of the error. Open test.mq5 in MetaEditor. Put a breakpoint on line #6, then run the debugger. The string() function bug was fixed before in build 3210. Wrong display of double floating point numbers in Dialog boxes and output of Print(), Alert(), Comment() and
Bug: EnumToString(SYMBOL_SWAP_MODE_CURRENCY_MARGIN)
I found this bug when using EnumToString() to display the swap calculation mode of a symbol. #define PRINT(A) Print ( #A + " = \"" + (A) + "\"" ) void OnStart () { Print ( "Build: " , TerminalInfoInteger ( TERMINAL_BUILD )); PRINT( EnumToString (( ENUM_SYMBOL_SWAP_MODE )
Bug in string() function. Wrong conversion of float -> string
Forum on trading, automated trading systems and testing trading strategies MT5/mql5 reported and confirmed bugs. amrali , 2022.02.17 15:33 Bug in string() function. Wrong conversion of float -> string. Build 3211 but this is not specific to this build, it's an old one. A bug is found in string()
How to get commission per lot in MQL5
Is there a programagic way (like SymbolInfoDouble, or AccountInfoDouble) to get the broker's commission per lot. From the market watch window, I can get it by right click on a symbol -> symbol specs. Anybody has an idea how the market watch window implemented it? I suggest this feature should be
CodeBase Bug: Code validation completed with errors
mql5\Scripts\Export_Summary_By_Days.mq5(12,11) : error 106: can't open 'MQL5\Include\Trade\DealInfo.mqh' include file mql5\Scripts\Export_Summary_By_Days.mq5(74,4) : error 256: 'CDealInfo' - undeclared identifier mql5\Scripts\Export_Summary_By_Days.mq5(74,14) : error 256: 'deal' - undeclared
Bug: function MathSample() does not generate correct results
The function MathSample() (defined in <Math\Stat\Math.mqh>) does not generate correct random samples. This a fix for the include file <Math\Stat\Math.mqh>: bool MathSample( const int &array[], const int count, int &result[]) { int size= ArraySize (array); //--- check array size if (size== 0 )