Forum

MQL4 How to know the currency margin of a Stock or Index?

Hello, while I am calculating the Contra value of portolio (all the positions that I have) in forex and stock, I found this problem ... In Forex I can know the deposit currency and the currency in which I am trading for its symbol (EURUSD, AUDJPY, USDCAD), so I have lots and base currency to

Text separate window - Doesn't show text when started only after changing once timeframe

Hello, I wrote an indicator text based, no lines, no graph, a separate window like iExposure.mq4 using #property indicator_separate_window , in fact I started from that indicator to build mine and I noticed that iExposure does the same thing, nothing appear until i change time frame. My problem is

How recognize if market is open or close or it's Saturday or Sunday?

Hello, I open this post because I was using DayOfWeek but last weekend as it receive the last known server time my script think it was Friday... I tried to use MarketInfo(TRADE_ALLOWED) but it didn't return me FALSE neither TRUE but if I well remember last weekend it return -1 ?? My script is a

How to avoid that every time i write on CSV file it write row after row?

Hello, last time I learned how to avoid that when I write to a CSV it overwrite the same file ( FileSeek(filehandle,0, SEEK_END ); ) Now my problem is that after writing,even without closing the file, it change row every time it write. I also tried with txt file, and it write row after row. I

How change row after FileOpen - FILE_WRITE ?

Hello, (first at all sorry for my not so correct English) I'm using th function FileOpen and FileWrite like this codes: int filehandle= FileOpen ( "datosbloque2.csv" , FILE_WRITE | FILE_CSV , "\t\r" ); // FILE datosbloque2.CSV if (filehandle!= INVALID_HANDLE ) { FileWrite

Highest and Lowest using datetime

Hello I'd like to know if there is a function that return highest and lowest price reached during a period expressed in datetime format (i saw iHighest but it uses the number of bar , not date-time) Is this possible? (As I know when the price reaches a level and when it reaches another level in

Recognize when an order ticket is in history list (closed order) / HELP

Hello, I'm newbie with mql4 but I have some experience programming in other languages... This is not my first EA or code... but I don't understand where I fail, so please I need help. In the array ticketoperacioneslong I memorize the ticket of the orders i placed. I want to be advised