MQL4 and MetaTrader 4 - page 211

To post a new topic, please log in or register
  EA problem! (11   1 2)
Hi, Can anyone help me. I am having an intermittent problem with my EAs. My EA's are very simple. They calculate the order size based on the previous high/low and place an buy/sell order and place a stop. When I start my MT4 platform the EA's will sometimes load automatically! They are not coded to...
here is my *flat chart* indicator. I want to add ofset to every new bar which is the same type as their own previous bar ( every bar that is not the first of its own type). The ofset value will be = (Open (present bar) - Open (first bar of the *present bar* type)) I'll be glad if someone can help....
husonchows
What does it mean by , bool x=(a,b); ?  I am reading code . and i dont understand what's this about . a=true and b=false ?     if(CompareDoubles(sl,OrderStopLoss()) &&       CompareDoubles(tp,OrderTakeProfit()))return true; Thanks for answering 
hello  i am trying to make an indicator  everything is well and good except for one thing  as you can see when the conditions are true the x sign is appearing in a separate indicator window but its not fully visible so how can i move the x sign a little bit above so that the whole sign is visible...
hello i am currently working on a system, and i am trying to create a histogram like the one attached below  but what i currently have is this: so a little help would be appreciated.  source code to my indicator is:  #include <stdlib.mqh>#include <stderror.mqh>//--- indicator settings#property...
Comments that do not relate to the "EA problem!", have been moved into this topic.
Hello everyone, am building an EA to display the pips in a candle stick as a comment. But am confuse on how to go bout it. I used ((High[1]-Low[1])/_Point) but when displayed am seeing a different value.  When i use((High[1]-Low[1])*_Point) i get a totally different value too.  so please guys what...
I have an EA loaded and running in metatrader on several symbols and timeframes that has been running for the past week on a demo acct, and is placing trades; however, it seems to be placing trades in the opposite direction than I want them. Meaning, it biases placing trades toward SELL when it...
When I place the following code onto the chart why does it usually take 5 minutes to load onto the chart. I know im doing something wrong with buffers and iMAOnArray but cant see what? #property indicator_buffers 1      //---- buffersdouble...
Hello to everyone, and thank you for your very generous contributions. I'd like to contribute too to your amazing community! I have studied MQL4 book and doc a year ago in the website and I found it very amazing. Right now I'd like to take my skill to a new level. I'd like to create custom graphical...
Hello everyone, I have been trying to call a second EA from my main EA. I have tried to use #include <KeyBoard.mq4> which causes an error "Can't Open D:\xxx\xxx\xxx". I would like know the correct way to make this possible.
Hello, I am new to mql4 and i start to make my own EA using condition which i take from some free indicators and some bought indicators from the market. I was so disappointing today ,when the developer of an indicator(pattern detection) tells me that is a trading system and it is not have iCustom...
I am trying to open .txt file for read and write access to log some information. Following is the code snippet. int OnInit() {    string fileHandle = FileOpen("test.txt", FILE_CSV | FILE_READ | FILE_WRITE, "+");    if (fileHandle < 0) {       Message("Can't open test.txt in MQL4\\files folder for...
Hello, I am very new to this site/community, but I have become a real fan of making EA´s. Through various websites and youtube I have become introduced to MQL4. Just finished my first EA and after quite a lot of syntax errors that I was able to correct/improve the syntax. After testing my program I...
I made this ea to close all open trades when total pips reach +30, but it doesn't seem to be working, what's wrong with the code? //+------------------------------------------------------------------+//|                                               close on pips1.mq4...
It's just a simple candle pattern recognition indicator that has an alert already on it, but there is no sound to the alert.
Hello everyone I'm trying to setup a new trading strategy It's my first, so I have a question. Let's say I start with OP_BUY with a TakeProfit of 2 pips If the martket goes down, so taking no profit, I want to do something else So { OrderSend(Symbol(), OP_BUY, etc...) if(the market goes down open...
Hi guys, I'm relatively new to building my own EA's and would appreciate some assistance coding a customized exit. I would like to close both long and short positions at the middle BB. Thanks in advance for your help!!
Hello fellow traders, I want to modify an existing Murrey Math Line indicator (https://www.mql5.com/en/code/8570) on how it drawth the lines. Right now it draws the Line as a Horizontal line on the charts but I want to change it so the line will be only displayed from the current candle (start) to...
Hi there,  Just want to ask, if I use an activation on my current PC. But my PC seem have some problem so I have to take it to the shop and might reformat the PC. So is that mean that I will need to spend another activation on the next? 
I am trying to write ea that will place buy when the indicator show arrow sell or buy. I am using icustorm to do that but i am struggling with comparing values. here is my code:        void OnStart()   { //---        double sell=iCustom(NULL,0,"myIndi",0,0);        double buy=iCustom(NULL,0,"myIndi"...
Hi, I'm a relative newbie to MQL4 (but not programming). I have created a new EA. I find when I run the EA it somehow defaults to the symbol at the top of the Market watch window, in this case USDCHF. I.e. the Symbols() function returns USDCHF. The output in the Experts window also refers to USDCHF...
Hi I'm trying to retrieve the last 3 values of stochastic main,  and calculate the angle of these three values/lines Is there a way to do this?  I have no issue calling the values out, just can't figure out how to get the angle of these 2 lines (that connects these three Dots)  Thanks! 
Hi, I would like to add an alarm on trade entry to my EA, can someone assist with the code. Thanks
Hi, Is there a function out there that scans forex factory for upcoming news and if there is, it will not trade?  I'm trying to code an EA to have the ability to know if there is upcoming news and if yes, how many minutes away, and if it's high risk news.
Hi Guys ,    I am new in Programing , and want use from an Indicator ( its name is Trend Signal ) , and Signal Line , I tried use iCustom in my EX but it don't give any data , I will be very thankful if you say me where is my wrong ....
how to limit the number of orders on mt4 to be allowed ? to open maximum 5 orders for example? is there any EA or script for this? or configuration?
i have been baffling with the alert when on the current candle , that is i want it to be given immediately the arrow show on current candle. Have worked on the arrow to be showing on current candle when conditions are met  by changing the array to 0 (zero) in other be reading current candle. if...
There doesn't seem to be any function that indicates whether the market is open or closed. I have looked at: IsConnected() IsTradeAllowed() MarketInfo(Symbol(), MODE_TRADEALLOWED) However all of these still return true or 1 during the weekend. Is there a foolproof and good way to truly determine...
Hi, In the attachment is an indicator which does similar to StochRSI. There are two input paras: RSI and K and D. When I chose RSI=14, K=2 and D=2, I get error message as follow: ... 2017.07.09 21:03:30.843 StochRSI EURUSD,H1: zero divide in 'StochRSI.mq4' (77,56) ... But by some other timeframe...