MQL4 and MetaTrader 4 - page 1141

hi folks, I tried to modify one of my iondicators so that a partial number of Bars (=partial timespan) is calculated and showed in the chart window Only, i.e. for example that the Bars 50 to 100 should be used/calculated and shown by the indicator only. I tried some ideas with the...
[Deleted]
Forex EA (Expert Adviser)Forex Robot Programmer Developer Hi,By Profession Im Software Engineer. But fromlast 7 years Im in Forex Trading. I 've developed many more Forex Robots EAExpert Advisers, and distributed to client as per given criteria. There are somany satisfied clients (National and...
I have an Indicator that I created, it's main purpose is to show the output from a function that I have created to form part of my EA. In effect the Indicator bit is just a tool for testing the function . . . It all works as expected when I open a chart and add the indicator to it, switching...
[Deleted]
Hi all, While working on an EA which was losing horribly, I thought well if it is losing big, why not turn it around and make it winning big! I changed every buy condition into a sell condition and visa versa. So all my buy and sell orders should have been reversed and now every loss should be a win...
[Deleted]
I got tired of compiling include files and seeing the 'warning "someFunction" is not referenced and will be removed from the exp-file'. By the time I get to the script that uses them all, the list is so long I have to scroll to bottom to see if there are any errors. So I created a bogus start()...
[Deleted]
Can anyone help with this code im trying to make it enter a trade when the 2 LWMAs cross and #3 ema confirms trend but for some reason the LWMA crosses dont work, can someone look at the code and tell me where i went wroung?...
[Deleted]
hey im new to this forum i see alot of good systems on here with good results, can anyone point me in the right direction of ea building, as in which strategy is best used for long term consistent profits e.g. indicators, price action or hedging. as of right now i built a simple ea that crosses 3...
[Deleted]
  3 EMA and 2 LWMA  (2)
//+------------------------------------------------------------------+//|                                                   Prodi5MAs.mq4 |//|                                    Copyright © 2011, PRODI GROUP...
So... the other day I whipped up a little genetic algorithm to find systems and then I remembered that the Strategy Tester has a genetic algorithm checkbox. So... would it make the most sense to write an EA that took inputs for Indicator1Type, Indicator1Mode, Indicator1Period, Indicator1Type,...
[Deleted]
I have been experimenting with adding an additional index array to a modified iAO(). The new index is not intended to draw anything. Instead, I want that index to return a 1 if the "up" buffer has received the MACD value, and -1 if the "down" buffer has received the MACD. My thought was that, since
[Deleted]
  #define vs global  (11   1 2)
Is there any advantage to using #define instead of a global variable? My gut tells me that a global variable can be changes but a #defined variable can't. Is there any other thing to consider?
[Deleted]
I read http://geosoft.no/development/cppstyle.html#Naming%20Conventions so that my code can look like others. Now I can't figure out how to name something to coincide with Conventional naming. I know that I can do it any way I want, but I would like my scripts to look like the experts, so that...
Hi Noob here, From lesson 13 of the forex.tsd site I toyed with this just to learn to code and make it do different things for practice Also changed if from EMA cross to MACD cross Here is what I have simple macd cross and attempting to make a 5min with 4hr MACD agreement EA just to learn how. http...
[Deleted]
Is there a way to check for this error before a trade is actually attempted
Hello coders, I am still relatively new to coding and I am writing an EA that does pretty much what i want it to. It opens trades when I want it to, it closes them when I want it to, etc. However, I have run into a wall. I want the EA to have a maximum of 2 open orders at any given time. If there...
  Adding Color to an indicator  (33   1 2 3 4)
I would like to print a red square (small) on the chart when the next higher time frame is going down. And a white square if it is going up. How do I do that? Once I get that figured out, I can then add other time frames and different bars. my code so far is: // 30 min current double open.30.0
[Deleted]
Hi I wonder if anyone can help? I've tried to download Meta Trader 4 demo a/c but when I get to filling in personal details I find that it will not allow me to fill in account type or currency boxes which are blank and of course I can get no further! I have un and reinstalled the programme and...
[Deleted]
Forex EA (Expert Adviser)Forex Robot Programmer Developer Hi,By Profession Im Software Engineer. But fromlast 7 years Im in Forex Trading. I 've developed many more Forex Robots EAExpert Advisers, and distributed to client as per given criteria. There are somany satisfied clients. If any one wants...
[Deleted]
  EA Fault  (20   1 2)
I am using an EA on alpari with 402 build that works ok,i have installed the same EA on fxpro same 402 build but it will not work,Where should i look to find this problem,i have no coding knowledge. Thank you
I have some code that are supposed to do two things as soon as the first Buy or Sell order closes at a profit: 1. Reset a list of variables back to zero 2. Delete any outstanding/exisiting buy or sell stop orders I just cannot get it to do these two functions and i need some help since i cannot...
[Deleted]
I'm new to MT4. I have 2 include files (file_1.mqh & file_2.mqh). They are both general purpose functions, but for organizational purposes I would like to keep them in 2 files. Each file uses a function in the other, so I always get an error saying "some_function() doesn't exist" when I try to...
[Deleted]
Hi, I would appreciate some help on the two issues described below. If a user drags and drops an EA to the chart, is there any way for this EA to find out the exact time/price where the user has dropped/released the EA on the chart? Another question: can an EA make some kind of call to the user...
Hello I create trading ideas in Excel and then write an EA based on these rules. I am stuck however with Average Deviation. This yields different results than Standard Deviation but I do not know how to write it. Here is an example of the Excel code and I would be very grateful if someone can...
[Deleted]
I know this is a weird question, but I'm trying to figures out what kind of things are possible in MT4, so I'm experimenting. If an include file has errors saying that a variable is not defined, but it is defined in the mq4 file that #includes it, will the script or indicator still operate properly?...
[Deleted]
I use the #include statement in an MQ4 file to #include an mqh file. When I compile it, there is no error. I then go the the mqh file and put in an obvious error, but don't compile it. I then go back to the MQ4 file and compile it again and there is no error. That tells me that the compiler...
[Deleted]
I am working on a strategy the places trades on multiple pairs. I use MarketInfo("GBPUSD", quantitative variable),MarketInfo("GBPJPY", quantitative variable),MarketInfo("EURJPY", quantitative variable) etc... to retrieve info for all pairs and I send all the required info with the respective...
Can I use price overlays on the charts?
[Deleted]
So i am just starting to learn MQL4 and i have read couple of tutorials. So can someone give me general directions how to code Parabolic SAR and set that MT opens position whenever SAR shows trend change. And second thing is that MT opens position 10 times my balance. Thank you
I need to run MT4 in Linux OS, I know this can be done through a software called WINE which allows to emulate windows' software. However, I also need to know if MT4 can be run in some sort of "batch mode", I mean, like a command line (e.g. terminal.exe -optimize) and execute optimizations from...
Hi all, recently I've developed a EA in MT5 and would like to transfer the transactions done in MT5 to MT4 through a set of programs offered in https://www.mql5.com/en/articles/189. It composes of 2 programs, one each in MT5 and MT4. The bug that I have found was in the program in MT4 so I would...