Forum

Help using OrderProfit() in MT4

Hi, I wrote an EA which can trade 1 to 3 Trades at a time on the same currency pair . The code snippet below seems to calculate the Open Order profits okay but on close they are out by a few percent. If I run one trade it is accurate. Can anyone look at the code below and offer any advice? for(

TrendLine Alert

Hi, I am looking for an Alert facility when a price closes past a TRENDLINE in MT4 (Metatrader 4). I know how to do this with HLINE and VLINE. I need to be able to know when the price closes above/below a OBJ_TREND (trendline). It can be at any angle although not verticle (although if it could then