MQL4 and MetaTrader 4 - page 1401

To post a new topic, please log in or register
Is there a way to get the total positons held besides looping with OrderSelect looking for OP_BUY and OP_SELL and counting with OrderLots() and if not,does anyone know how fast this, especially in a rapidly moving market such as arounda report?
I'm playing around with scripts and realize that they don't have the ability toset external variables. Is there a way to pass a variable into a script eithermanually or via another indicator on the chart? Here's what I'd like to do. I want to identify an upper and lower channel on thechart. I'd...
Can anyone tell me how to get and compare the last three prices (ask or bid)?
I WANT TO WRITE AN EA that will place 5 buy pending orders above the present priceat 5 pips interval and 5 sell orders at same interval below the present price.Anyone can help with the code please.
Preserving capital in the forex market. Being new to this autotrading, I desired a way to "Catch" this critter if it ran away (because of some unforseen condition in the market that might hit a weak point in my expert) and started losing my capital while I was asleep...I thought I might set a limit...
Hi, question: the script "Trade" needs some changes or does not everywhere works as default? This is what I am getting : 19:28:10 trade USDJPY,Daily: loaded successfully 19:28:12 stdlib USDJPY,Daily: loaded successfully 19:28:12 trade USDJPY,Daily: Error = invalid trade parameters 19:28:12...
  LOOKING FOR EXP. M/A EA!! (16   1 2)
Hi, does anyone have an EA for a 2 line exp m/a crossover entry and exit signals? thnx
Code base StringArraySuite.mqh submitted 2006.07.14 not yet proof read?
This is a cool idea. http://www.cot4metatrader.com Glyn
Hi I was wondering if I could enlist the help of someone to help program an EA that would be used to trade news events. I have developed a very simple method which I try to use before all major news events, which has been working very well over the past few months, and I would like to now automate...
I've this code i will pass you, the code, is based in ADX, and has to do 2 things. First to set Arrows when the ADX make a Cross, and Second to set a 1 Alert whenthe Arrow is set in the Price Chart. The Arrow thing is working, but i have the issue that when i try to set up thealerts, i have 2...
I would like to establish a business relationship with a programmer for EA workthat I need immediately.  Please post your interest here, and I will contactyou.
Hello all I wrote an EA that works ok with real time quotes (InterbankFX) but when I tryto test it with Strategy Tester (ST), all attempts to buy or sell result on error131. What can be wrong ?
MetaEditor Help contents are the same as those of the MQL4.Community Documentation? To get references about MQL4, there is no need to download megabytes from internet.Everything you need is in your PC already. You just have to open the "Help"tab in the "Toolbox" window of MetaEditor....
I've been trying to code an expert that buys when the faster MA crosses above theslower MA and sells when it crosses below. The expert enters trades correctly butit won't close a trade and start a new one when the MA's cross. Can someone tellme what I'm doing wrong? int start() { double MA5C,MA20C...
Hi somebody out there pls help me to evaluate the following EA , as of whyit perform good result on backtest for model :control point and not model :everytickand also the EA on demo acct did not tele EA with backtest on control point   attachis the...
I have written a few custom indicators in MetaEditor and cannot seem to find a wayto make the Y-Axis auto scale... I keep having to go back into the program to changethe scale manualy as the indicator output value changes... below is my code...what would I change to make this indicator auto-scale...
Hi, I'm not able to find a solution for this, so I'm asking for help. I'm using Heikin-Ashicandles for my charts and I want to create a moving average line for the last 10bars in the same way we can use iMA. So my HA indicator uses this call: iCustom( NULL, 0, "Heiken Ashi v2",0, 0 ) how can find...
Hi , Do our brokers know which ea's or tactics we use? I think that they do, and they even know our names, how? 1) I have a friend who owns a forex brokerage - and he told me outfront that thebrokerage is following the best traders , and when the best traders open a positionthey(the brokerage)...
Hello moderators and friends, I posted a question under this heading, but it might have been overlooked, (sincethe original author had their part answered) so I'm reposting it as a new subject. How can I write an EA to open multiple orders and close them independantly. Ex:go in on a buy, then a...
  Help Need (1)
Hello everyone I'm working in this Adx Arrow Alert, the thing is it works but it only work 1 time,let me expleand, when the arrow (Red or Green) shows-up it send me the alert ashas to be, but when the next arrow apper it don't do nothing, can someone can helpme whit this.. i'am new in this things...
After some backtesting, I almost always get a HUGE /tester/logs folder. That sucksso much. There one HUGE log file. After I delete it I have to defragement my hddevery once in a while just because of that one BT logfile. :( Anybody else experiencingthis? How can I make MT not logging all these...
I'd like to know exactly what means "Last part of the comment may be changedby server." I need to know how much of this comment is modifyable by the server,cause I want to use the comments for the EA to know when to close an order: forexample: "1.2756 M1 9 26" meaning that the order has taken by the...
  Question.... (1)
how i can see the price right now??? and where i can see a StopLoss example???
Is there any way to pass by reference?
Is it possible for me to get the open, high, low, and close, for a specific tradingtimeframe of my choosing? For instance, if I want to know what the OHLC is, for the 6 trading hours between4am and 9am, is there a code that can do this? I was thinking that I could load up the last day of 1hour...
  Date Question (3)
I've done a search through the site and the documentation, but can't find any informationon how to concatenate date parts. What I'd like to do is to create a dynamic magicnumber based on today's date, formated as 20060712. The closest I've come is usingthe StrToTime function: string...
I'm a newbee: does anyone have an example of using existing indicators, like theAlligator or Fractals?  Suppose I wanted to trade on logic like "the high and loware outside the range of the alligator and this bar represents an up fractal"? I guess I'dt copy the indicators in as functions, modify...
Hi all, Do our brokers know which ea's or tactics we use? I think that they do, and they even know our names, how? 1) I have a friend who owns a forex brokerage - and he told me outfront that the brokerage is following the best traders , and when the best traders open a position they(the brokerage)...