Forum

php isset() equivalent in mql4

So I found out that when terminal is saying "Waiting for refresh" (When chart disappears), and is tick, my Expert Advisor is throwing array out of bounds error on Time[0] array. and then EA stops working, so how can I check this array before using it if array exists. who are familiar with php - the

Getting error when checking Volume[0]

I've written my EA, and it acts kind of strange on live but on tester it works all fine. On live it's giving me this error after what EA stops working "2014.06.25 14:24:01.661 array out of range in 'Buy.mqh' (116,48)" It's kind of strange because line 116 in that file is "else if (BUYSTOP_MODIFY

How to draw line SEGMENT

I need to draw line segment to show buy open and close position, I've found ObjectCreate but there is no such segment available only Trend which is infinitive line which doesn't fit my needs. So is there such line segment in mql4, to clarify I want to make lines as in tester visual mode where it

XOR in mql4

I really cant find it in reference... Is there XOR

Divide source codes into files

Hi, just wondering is it possible to divide my source code - which is getting quite big - into separate files and include it to main *.mq4. But of course I need access from main *.mq4 to variables and functions in other files

Modifying OP_BUYSTOP / OP_SELLSTOP price

How to modify OP_BUYSTOP current price / position??? For me OrderModify is not working, don't know why... Maybe doing wrong And on each tick deleting and creating new ticket is not very smart and cool :D

How EA can interact with indicators?

Hi I'm new to MQL4, and I don't really understand forex. I'm programmer and my father just asked me to make for him Advisor, he wrote me and algorithm which I now try to realize. With his system I need to interact with Moving Averages , so how can I interact with them like: 1. Add/Create new