Forum

Is Mql4 stable? Part2

Hi, I recently posed a question why I was getting unstable results and I got some helpful responses about the problems with the scope of the code. However, I've had such bizarre results (that have nothing to do with the scope) lately that have really stumped me and make me wonder if I should even

Is mql4 code stable?

Hi, I am having trouble with my code and am wondering if the fault is always with the programmer or sometimes it could be the stability of mql4? The problems usually occur after a long list of "if statements". I've included a typical example of the complexity of the code below. There would be about

Am I going crazy!

Hi, I really hate to post this, but what am I doing wrong.??? The very simple code below though obviously false, returns true. If I swap || for && it behaves properly. Please help! void OnTick () { //--- if (Piv1() == true ) { Alert ( "Piv1==true" ); } }

Problem with passed parameters in a function

Hi, I am trying to make an EA with many different stoplosses and takeprofits. So I wanted to make functions where I can pass the ticket number and it would automatically do the sl and tp. This will save much time and coding. The code below works properly in that it will modify the order, however

Problem with stop loss code

Hi, I am having trouble with my code which I use as an extra insurance to close any trades that are too far in the red (more than 7 pips). It seems like it closes trades almost immediately some times. It seems very unstable. I am wondering if a switch operator cannot handle more than one

Problem with this simple code

Hi, I am fairly new to MQL4 programming .Was doing ok but I am completely perplexed by this bit of code. All I want is to find on a one minute chart, the last 60 candles and compare the closing price to the price of the 300ema, and then set up a counter of how many of those closing candles are above