- Search Energy EXCH
-
CodeMeister replied Jul 26, 2010Never Share — If you have library functions that are general purpose and reusable, never share other variables - pass everything you need by parameter. This will save you lots of problems in the future.
Can I get a little help with EA which includes many functions?
-
CodeMeister replied Jul 23, 2010That is Right — That's the MT4 works and there is no way of getting around that in MQL4. There are a number of possibilities outside of MT4 using common scripting and programming languages which basically copy files from experts/files to ...
How to write to other directories in mt4
-
CodeMeister replied Jul 22, 2010Static Variables — Those variables are more properly called static variables with a program scope. What I mean by program is an indicator, script or EA. They are static in that between calls the values don't change like local variables and ...
Does restarting MT4 reset the EA flags?
-
CodeMeister replied Jul 22, 2010This Won't Work — A script is not the proper way to do this. It is for one time tasks such as downloading history or cancelling orders. This code belongs in an indicator or perhaps an EA which runs continuously and does the computations for ...
MT4 script help
-
CodeMeister replied Jul 20, 2010How Quickly Things Change — Looks like its a 5 digit world. FXDD just advised all clients they will switching to 5 digit on Aug 1 for demo and Aug 15 for real money. Gain Capital might be the last one standing.
MT4 4 digit charts
-
CodeMeister replied Jul 19, 2010Welcome to the World of Programming — There isn't a chance I am going to wade through that much code to find a bug. Once you have it narrowed down to 5 or 10 lines I might be able to help. I have enough of my code to work on.
one signal one position
-
CodeMeister replied Jul 18, 2010Don't Understand — First of all the code is unreadable. Please post in PHP tags. Plus I need to know what isn't working. I don't think its taking multiple trades, but can't be sure if you don't say exactly what the problem is.
one signal one position
-
CodeMeister replied Jul 18, 2010Try This — By default the code in the start() function is executed for every tick. You have to add special logic to only execute once per bar. So if I understand your question, the answer is do nothing. As far as preventing multiple trades I ...
how can I assign previous bar rsi value (learning mt4 language)
-
CodeMeister replied Jul 18, 2010Try This — Do not set a flag in your code to indicate a trade is open. There are all kinds of external activities that may close your trade without the EA knowing. So what you have to do is use OrdersTotal(). But this would also count orders ...
one signal one position
-
CodeMeister replied Jul 17, 2010Wrong Approach — I think a script is more suited to what you want to do. An EA is for things that you want to perform over and over again. A script is intended to do one off things like you mentioned. I just wanted to be sure that you have ...
EA to send acct balance to a txt file...?
-
CodeMeister replied Jul 16, 2010That is Right — That is the only circumstance I can think of where auto reconnect won't work. There is a way to avoid that, but off the top of my head I can't think of it now. There are lots of previous threads about this.
How to Auto-Reconnect when Metatrader disconnects?
-
CodeMeister replied Jul 16, 2010Built In — MT4 will reconnect on its own. No need for anything extra. If its that much of a nuisance - its probably the broker feed. There is a huge discrepancy in brokers' ability to maintain the connection.
How to Auto-Reconnect when Metatrader disconnects?
-
CodeMeister replied Jul 16, 2010Try This — close.mq4 script comes delivered with MT4.
close all positions
-
CodeMeister replied Jul 15, 2010Sent PM — I just sent you a PM about this.
Help! Snap and Batch Properties change in MT4
-
CodeMeister replied Jul 15, 2010Can Do — #1 - I worked on a recent project with Andrew's Pitchfork to do this. It was much more involved than it looked at first and involved a lot of coding, but I came up with a successful solution. What you want is much simpler. I don't ...
Help! Snap and Batch Properties change in MT4
-
CodeMeister replied Jul 15, 2010Try This — Its no mystery why nobody is offering to help. Try the magic words "please", "willing to pay". I'm sure that will suffice. PM me if you wish.
Need Custom indicator with alert....Pls..
-
CodeMeister replied Jul 15, 2010Try This — This is easy to do if you know MQL4 basics. Playsound() will do what you want. Lots of explanation and examples in online help.
mq4 alert file please help
-
CodeMeister replied Jul 13, 2010Try This — Most objects on the screen are positioned according to their time(X) and price(Y) values without too much trouble. The simplest is usually the best.
draw object on a chart
-
CodeMeister replied Jul 13, 2010Same Problem — I spent considerable time working on much the same problem and didn't solve it. I tried others code such as Heiken Ashi and HMA but never really came up with something that didn' whipsaw during ranging conditions. I think the ...
Visual Interpretation to Mathematical Values Problem
-
CodeMeister replied Jul 13, 2010FXDD — FXDD is still 4 digit and one of their senior traders indicated that there were no plans to switch.
MT4 4 digit charts