Miroslav Popov / Publications
Forum
How to define a dynamic nested array in MQL5?
I need to allocate dynamically an int nested array like: [[1, 2], [3], [4, 5, 6]] I tried with the following syntax, but it doesn't work: int arr[][]; // [[1, 2], [3], [4, 5, 6]] ArrayResize (arr, 3 ); ArrayResize (arr[ 0 ], 2 ); ArrayResize (arr[ 1 ], 1 ); ArrayResize (arr[ 2 ], 3 );
Is `IsTradeAllowed` the same as MODE_TRADEALLOWED?
Hello, Is `IsTradeAllowed()` replaceable with `MarketInfo(_Symbol, MODE_TRADEALLOWED)` and vice versa? In the docs is written that `IsTradeAllowed` is equal to ` TerminalInfoInteger ( TERMINAL_TRADE_ALLOWED )`. However, it is not clear is `IsTradeAllowed` means the trading is allowed by principle
MetaTrader 5 Strategy Tester Leverage is locked to 1:1
Hello, The MT5 strategy tester leverage is locked to 1:1 no mater my demo account is 1:100. I deleted the account and created a new one but no luck. Any ideas? MT screenshot: Account screenshot
How to find the Friday's market closing time?
Hello, I want to find at what hour the market closes on Friday . I'm trying with the following script but it returns 0. However the market closes at 22:00. How can fix the script in order to make it showing 22? datetime openTime; datetime closeTime; bool isOk= SymbolInfoSessionTrade ( _Symbol
How to close a position programatically in Hedging mode
Let's open a position in a Hedge account with a given Magic_Number on the current _Symbol. void SendOrder( int command, double lots, double stopLoss, double takeProfit) { ResetLastError (); MqlTick tick; SymbolInfoTick ( _Symbol ,tick); MqlTradeRequest request; ZeroMemory
Binary Options Expert for GO Markets
Hello, Can you help with setting an EA for trading Binary Options with GO Markets? What is the format of the order comment for setting the option's expiry
MQL5 make Hedging mode = Netting mode
Hello, I want my experts to trade on Hedging mode in the same way as in Netting mode. To do so, the expert must add, reduce, close or reverse a single position. I'm trying to set this by setting the currently open position Ticket to the MqlTradeRequest but it works only on reduction. How to set
MT5 tester - Trade is disabled
I'm receiving this error in the MT5 tester: ResetLastError (); MqlTick tick; SymbolInfoTick ( _Symbol , tick); double orderLots = NormalizeEntrySize(lots); double stopLossPrice = GetStopLossPrice(type, stopLoss);
How to Draw line from Price1 / Time1 to Price2 / Time2 ?
Hello, How can we draw a dashed, colored line from a (Price 1, Time 1) point to another (Price 2, Time 2) point? Something like the blue dashed lines on this screenshot
GZip Algorithm in MQL
Is there GZip algorithm in MQL? I searched the MQL4 and MQL5 sites and Google, but no results found out