Friends 1
idh
Added topic Odd issue getting an open position's Open price
I've had some code that has been working fine on a demo account ever since I wrote it 9 months ago.  Using MT5. I recently moved to a funded account (live) and have run into issues. Here a snippet of my original code where I located the issue is
idh
Registered at MQL5.community
idh
Added topic Partially closing losing positions
Hi I think I've misunderstood how partial closing works. I was hoping to use it to reduce losses on losing positions. Say I have a buy position open with a TP and SL set, I've bought 100 lots. The position starts to go bad and approaches my stop
idh
Added topic slow Server execution and open price vs take profits - what happens?
Hi I've a bit of hypothetical situation that Id like put out there as I do not know the answer. The broker I am using for my MT4/EA activities is a tad slow at execution sometimes, and you end up with a order open price a few points out of what you
idh
Added topic iHighest strange result, cant figure out
Can anyone see a problem with this snippet: I first try to determine which bar the trade opened on, then using the result of that I want to use iHighest to locate the highest bar since (and including) the trade opened. But I get a strange
idh
Added topic trailing stop loss calculation question - on bar close price or calc and set in real time?
Hi I'm coding up some trailing stop loss functionality for my EA. I was wondering what people's thoughts/opinions are with regards to using Moving averages as basis for stop loss, or something like ATR? But my main question is, assuming I use a
idh
Added topic Checking whether a order/position has a stoploss set
Hi Is there a way to determine whether  a current/open position has an S/L set? e.g. true, false, and then extract what value is set? I cant figure out a way to do it. thanks ian 
idh
Added topic Quick question about MT4 terminal
Hi   In the Account History tab in MT4 terminal client, there is an stop loss (S/L) column, where this field has a number and is shaded red does that mean the position was closed by Stop Loss? I think it does.    thanks
idh
Added topic MACD, again
Hi again,    OK, still having problems on something that should be a piece of cake. please see attached screenshot for a start.  All I'm trying to do is code a simple EA to go long on macd cross over and go short when it crosses over
idh
Added topic OrderSend/OrderClose command
Hi there   When one uses the ordersend/orderclose command, I know that ordersend returns -1 if it fails, and some positive integer if it succeeds, we can store this in a variable called ticket. when you use orderclose, that can return true
idh
Added topic if check on negative MACD histogram
Hi All Ignore whether this check is actually a valid way to go short :-) Can any one spot what's up with this code, I cant figure it out: if(dbMACDDivergence_Bar1 <= dbDivergenceShortSetting)  {     //short conditions
idh
Added topic MT4 Strategy tester weirdness
Hi   Having some odd times with the strategy tester , anyone throw any light on it? 1) My EA has a simple bit of buy code in it, here it is: ticket=OrderSend(Symbol(),OP_BUY,StakePerPoint,Ask,0,0,0,"Buy Order",MagicNumber,0,Green);
idh
Added topic Simple code for MACD within EA, self contained
Hi all  I'm new to MQL. I apologise in advance if I'm asking a question that has probably been answered lots of times already, I have looked around on the forum trying to find what I need. Simply, I'd like a snippet of code the