Forum

Economic Calendar

Hello, I read many threads about this topic but they are of some years ago and I want to ask about the actual situation in a more clear way. I want to develop an EA that is reading the values of the economic calendar and trade. My questions are: 1. How fast does the mql5 economic calendar give the

Partial Close Paying Swaps

Hello, I am performing partial close on yesterday positions. I noticed that sometimes the SWAP is closing proportionally with the lot size of the partial close order. Sometimes instead swap get fully closed in a partial close, without accounting for the lot size. In the screenshot below you have one

Partial Close By Order

Hello, Where may I send a feedback to metaquotes, I think there could be added a trade function on mt5 of "Partial Close By": Close By function allows us to close two trades one by another, saving up a spread cost, and be not influenced by slippage on the Close By operation. But with this is

Calculate how many lots to close in order to get a certain amount of profit/loss ?

Hello, I am building my EA with the purpose of "not closing" positions in loss. When the Close Conditions are met : a) If the current chain of trades is in profit than close in profit. b) If the current chain of trades is in loss, than hedge the loss by an opposite position with volume = to the sum

ObjectFind Freeze the Chart

Hello, I used to update a trade panel everytick to show the current PnL of the trades. This results to have some problems and to Freeze the tick flow sometimes, randomly. I searched a bit and I found that is better to place a Sleep function or a timer to not call ObjectFind every tick. That's my

CTrade PartialClose() not working ? Error 4756 - Code 10004 HELP

Hello people: if (!trade.PositionClosePartial(ticket_hedge_short[m],lots_toclose, 10 )) Print ( "Error Partial Close: " , _LastError , " - Code: " ,trade.ResultRetcode(), " - Description: " ,trade.ResultRetcodeDescription() , " - BID | ASK " , info.Bid() , " | " , info.Ask()); if

Not filling the order - HELP

This is the code: trade.Sell(fixed_lot,act_symbol,info.Bid(), 0 , 0 , "Sell" ) I don't have any problem usually, but sometimes, in the strategy tester this error appear. 2022.10.08 17:39:52.144 2022.09.05 01:36:00 requote 0.99053 / 0.99055 / 0.99053 (instant sell 0.1 EURUSD.Renko.ATR8.0 at 0.99052)

ORDER_TYPE_CLOSE_BY with Ctrade Standard Library

Hello, I can't understand how to close an open buy with a ORDER_TYPE_CLOSE_BY. my code : for ( int i= 0 ; i<tcount; i++) { if ( PositionSelectByTicket (ticket_chain[i]) && PositionGetInteger ( POSITION_TYPE ) == POSITION_TYPE_BUY ) { long stoplevel =

EMA values MT4 vs MT5

Hello, I just moved from Mql4 to Mql5. How to get MA value of the last Candle on MT4: double iMA (symbol,timeframe,ma_period,ma_shift,ma_method,applied_price,shift); so I need: double ema3 = iMA ( _Symbol , _Period , 3 , 0 , MODE_EMA , PRICE_CLOSE , 1 ); What I need to get this exact value on a

Error 4025 on Web Request

void Download_News() { if ( FileGetInteger ( "FFC-ffcal_week_this" + _Symbol + ".xml" , FILE_MODIFY_DATE , false )+ 4 * 60 * 60 < TimeLocal () || ! FileIsExist ( "FFC-ffcal_week_this" + _Symbol + ".xml" , 0 )) { string cookie= NULL , headers; string reqheaders= "User-Agent