Farzad Sadeghishahrestanak / Publications
Forum
Using bitwise operations for mouse bottom status in CHARTEVENT_MOUSE_MOVE
Hi. Can anyone explain to me why they have used (state& 1) == 1 not state == 1 nor sparam == "1" in the below sample? What's the advantage of using bitwise operation here, and why we shouldn't use other samples? Thank you //+------------------------------------------------------------------+ //|
Find appropriate font size when monitor DPI changes
Hi developers If I set a button/label height and width according to screen DPI like below double screen_dpi = ( double ) TerminalInfoInteger ( TERMINAL_SCREEN_DPI ); m_DPIScale = screen_dpi / 96.0 ; height = ( int ) MathRound ( 170 * m_DPIScale); then how can I find appropriate font size for that
Telegram bot signals can't read by WebRequest()
Hello. I have developed an EA. I send the important part of the code: OnTimer () { string url = " https://api.telegram.org/bot " + InpBotToken + "/getUpdates" ; int code = WebRequest ( "GET" , url, NULL , 900 , data, result, result_headers); if (code == 200 ) string message_text
Should we run FileOpen() again after the file have changed by another EA?
Hi I want to use an EA on several charts (1 is master mode for writing to the file, others are slave mode for reading from the file) int OnInit () { if (InpMaster) Handle = FileOpen (InpFileName + ".csv" , FILE_WRITE | FILE_SHARE_READ | FILE_CSV | FILE_COMMON , "," ); else Handle =
In Strategy tester, template's indicator doesn't load iMA() correctly
Hello. I attached my custom indicator to a naked chart and save the template as "tester.tpl". Then I run strategy tester and select the indicator again. So in visual mode I see 2 of this indicator. These 2 indicators works different! After many checks, I found that the one is attached by template
CopyRates of higher timeframe in OnCalculate function of a custom indicator
Hello. I want always have rates of daily timeframe in an array to use it in my custom indicator . I write it in this way to copy all daily rates in first run, and update only last day's rate in every next OnCalculate() call. But it seems this is not the correct way. Can anyone help me
Ask/Bid on offline Soft4fx's charts
Hello. I'm using Soft4fx. It can be used for visual backtest . It opens an offline chart in a past time and go ahead tick by tick. I can enable "show ask line" on the offline chart, and it shows the ask line. But my indicator can not read ask price. Ask returns zero SymbolInfoDouble ( Symbol ()
Is it possible to edit broker's history (.hst) files?
Hello. I try to open broker's .hst files from history/brokerfolder with FileOpenHistory() or FileOpen() functions to see and edit OHLC data, but I can not find any number like open price or any order of candle's data. Can we read inside .hst files? simple example: int handle=FileOpenHistory(
Report of incorrect information in MQL4 Reference (MetaEditor Help)
Hello. There are incorrect information about ObjectMove() in MQL4 Reference (MetaEditor Help). T wo variants, but one duplicated description. https://docs.mql4.com/objects/objectmove
mql5.com does not open in Chrome. certificate invalid
Hello. I'm having this problem for a long time. I can open mql5.com in Firefox, but not in Chrome. Does anyone know where is the problem and how I can fix it? Chrome is updated, I reinstall it several times, also clear cache, disable firewall, etc. but not work