Forum

Can not get 99% History quality by using MetaQuotes-Demo server

Hi, I would like to test an EA with 99% history quality on MT5. I am using the server MetaQuotes-Demo and I can not reach 99% quality but 97%. As you can see on the screenshot some historical data have a low quality between 2017-11 and 2017-12 How can I fix that in order to get 99% quality ? Thanks

PositionsTotal() return 0 after a call of function trade.PositionOpen()

Hi, After running the following code block: if (!trade.PositionOpen( _Symbol , ORDER_TYPE_BUY ,size,openPrice, 0 , 0 ,RobotName+" "+timeframeToString( _Period )) || trade.ResultRetcode()!= TRADE_RETCODE_DONE ) { lastErrorMessage="Position open failed. Return code="+ IntegerToString

I got the error message "There are no trading operations" (while uploading EA to MQL5 Market)

Hi, I got also this error message: test on EURUSD,H1 (netting) tester stopped because OnInit failed there are no trading operations I use this condition to enable the EA only on Hedging account // Enable only for hedge account if (account.MarginMode()!= ACCOUNT_MARGIN_MODE_RETAIL_HEDGING )

How much will cost a lot in currency account ?

Hi, Here is my problem. I would like to know how much will cost one lot (100 000 units) for a specific currency pair . For example I have an account in JPY and I want to know how much will cost 1 lot for EURUSD in JPY. Therefore I need to conver JPY to EUR (base currency). Is there a formula

Why text from OBJ_LABEL can have different size on different computers ?

Hi, I have displayed from the chart a text via OBJ_LABEL : ObjectCreate ( 0 ,name, OBJ_LABEL , 0 , 0 , 0 ); ObjectSetInteger ( 0 ,name, OBJPROP_CORNER , CORNER_LEFT_UPPER ); ObjectSetInteger ( 0 ,name, OBJPROP_XDISTANCE , x_pos ); ObjectSetInteger ( 0

Convert point from currency pair to currency account

hi, I would like to convert point from currency pair to currency account. For example assuming my account is in USD what will be the value in USD of 200 points on the currency pair EURJPY. I heard about MarketInfo(EURJPY, MODE_TICKVALUE)) which return value in USD for one tick and

By trying to delete pending orders from ticket number I got the error message "OrderDelete error 4108"

By trying to delete pending orders from ticket number I got the error message "OrderDelete error 4108" Here is my code: bool DeletePendingOrder( int ticket) { double freezelevel = ( MarketInfo ( Symbol (), MODE_FREEZELEVEL )+ 1 )* Point ; double openPrice, currentPrice; int orderType;

OrderModify Error 130 on pending orders

Hi all, I got the error "OrderModify error 130" but I do not why I got this error since I have all required check on take profit and stop loss before to call the function orderModify. Below is my code: int openPosition( int cmd, double volume, double priceDistance= 0 , double sl= 0 , double tp= 0 )

Indicator using function CopyRates does not does not retrieves prices from Broker server Data

Hi, I am currently programming an indicator multi currencies and mmulti timeframes by using mql4 language and I am not able to retrieve past data from broker server. For example I am trying to retrieve 200 last past prices on EURUSD H4 via CopyRates function while the indicator is attached

Error 130 on pending orders

Hi, Could you please help with the issue I am facing: Basically when I open a buy stop order without stop loss and take profit I got the error number 130 ( ERR_INVALID_STOPS) . On my code I have checked the limitations as defined on this page: https://book.mql4.com/appendix/limits So on the price