Forum

StringFormat hex output parameters... how to convert from hex to uchar or string

Hi... i am looking at documentation of CryptEncode function and there are a good example code... there are a function ArrayToEx that converts a uchar array to a Hexadecimal string... using StringFormat and "%.2X" as the output parameter. Well, i need to know how to do the opposite: Fill an uchar

Can a broker change an asset stop level? [SOLVED]

Hi all. The Stop Level of an asset can change by broker or it's every the same ? If i use the MarketInfo(_Symbol, MODE_STOPLEVEL) function to get the current stop level, i need to use it: Just one time, in initialization function ( OnInit function )... in this case, i am presuming that brokers do

Loading remote URL via Wininet.dll... how to detect HTTP errors ?

Hi.. Below is my ReadUrl() function to read remote http sites... and works fine! But it only works with valid valid content. If an error occurs(404, 500, etc) there is no solution so far. So i need to detect HTTP errors. Anyone have any idea on how to do this? #define READURL_BUFFER_SIZEX 100

How can i make my own function, that accepts parameters in sequence?

Hi all. How can i make my own function, that accepts parameters in sequence? Like this : int filehandle=FileOpen(filename, FILE_READ|FILE_WRITE|FILE_CSV );

How can i avoid ERR_TRADE_TIMEOUT on OrderSend ?

Hi... Houston, we have a problem! lol How can i avoid problems with error 128 on OrderSend ? On this code... i am opening a first order, and next order is opened as a Pending SELLSTOP/BUYSTOP order ... But, only if there is at least one ACTIVE ORDER... But... if i sent a order and returns error #

Need help to calculate Lot Size from a Fixed Value Risk, Stop Loss and Broker Commission

Hi all. I need to calculate the lot size based on a fixed amount of the account base currency and a StopLoss. But I need to remove the amount charged by the commission on ECN brokers. For EURUSD 5 Digit works fine... but not for other pair like USDJPY Then i do this: extern double InvestMoney =

Does anyone know how to use the GetSystemTime() function from kernel32.dll ?

Hello guys. I need to change the computer clock to the broker time automatically. I now i has to import kernel32.dll and use SetSystemTime function , but don't know about the parameters of this function. Does anyone know how to use it

How can i put objects in front all graphic elements ?

Hello. I am creating some label objects , and need to put them in front all elements on the graphic window... but not works. Is there any specific property for that? My code: void DrawBoxInformation( bool fixed= false ){ int y = 30 ; int x = 10 ; RectLabelCreate( 0 , "rectOrders" , 0

#resource "\\path\\to\\bitmap" not embed bitmap when compile

Hi, i am trying to compile an expert with bitmap embeded... but not works! As it's writed on the docs at https://docs.mql4.com/runtime/resources#resource_include i need to declare my resource using the command #resource to embed my resource on the compiled ex4. But not works! Below a code i use

Need to create Bitmap Object, but help documentation BitmapCreate function no works!

Hi. I am trying to create an Bitmap Object using BitmapCreate function of mql4 hqlp documentation... but nothing happens... can you help me? //+------------------------------------------------------------------+ //| Create a bitmap in the chart window |