Forum

Engulfing Bars Problem

I am trying to code for to identify engulfing bars but I am getting the wrong open, close, high, low values. This is the snippet of code: int currentBar = Bars - 1 ; // Get the high,low,open and close prices of the current and previous bars double currentHigh = High[currentBar];

Send Notification Question

I want to send a notification to my phone whenever there is an opportunity for a trade. It seems that all I can send with the SendNotification function is just a text message - which is different from the SendMail function. I trade on 10 different pairs. Is there any way that I can send the Currency

I have tried everything to get e-mail working

I cannot get the e-mail service on MT4 working! 1. I started with the usual smtp.gmail.com:465 and checked everything several times to be correct - but keep on getting error that it cannot connect. 2. I then made sure that "less secure apps" were activated - still the same error 3. Then I installed

MTF Trend-Magic

I tried to convert the trend-magic indicator to a MTF indicator but it does not work correcty. I know a little about coding EA's but nothing about coding Indicators so I need a little help. Here is the code below: #property indicator_chart_window #property indicator_buffers 2 #property

MACD Histogram values

When using the MACD indicator on the chart it shows 2 values - a Histogram and a Signal line . If you use the iMACD() function to calculaute the MACD values you have 2 options - MODE_MAIN and MODE_SIGNAL. I have always assumed thet MODE_MAIN represents the Histogram values. Now to my dismay I

Invalid stops error 130 with SL = 0 and TP = 0. WHY??

I have an EA that places BuyLimit and SellLimit trades. Most of the time there is no problem and the trades are placed successfully. But every now and then there is a trades that refuses to go through and ndlessly giving an " invalid stops " error. The problem is I define NO specific SL or TP. They

When is EA operative?

I program an EA on a certain broker's MT4 and then I copy it over to another broker for live trading. If the EA already exists on the other broker I overwrite the exisiting .exe with the new version. (Parameters stay the same) The older version of the EA on this second broker is already attached and

Problem with calculating lot size - please help!

I am increasing the lot size with each subsequent Limit transaction but my code/formula just keeps on returning my starting lot size. Here is the code to calculate the lot sizes with each subsequent limit trade that is generated: input double Start_LotSize = 0.01 input int LotMultiplier =

Error 4108 appears after code was working fine before.

I have been running the EA and did not notice the 4108 error before - but mow the code refuses to close my pending orders and give 4108 - invalid ticket errors. Here is t //Close Pending Orders when no trades open Count = 0 ; if (Sell == 0 ) { for (Count = OrdersTotal ()- 1 ; Count >= 0 ;

Returns zero for some unknown reason

The following code returns "0" for the BuyProfit variable although there are several Buy trades open and running. can you perhaps tell me why? Count = 0 ; for (Count = OrdersTotal ()- 1 ; Count >= 0 ; Count--) { if ( OrderSelect (Count, SELECT_BY_POS,MODE_TRADES)