MQL4 and MetaTrader 4 - page 1192

To post a new topic, please log in or register
Firs sorry for my bad English.. Now i need some script to chek, is there open orders. Something like this: if (OrderType()>1) { .... } or MagigNumber, Order ticket... I don't know, and while i have this problem, i can't see the final ideia of EA. So please can somebady help me... please..
Hi Guys, First of all, I want to thank you all for contributing on this fine forum. I'm writing my own EA, but I still haven't mastered mql4... this problem is very easy to solve for a beginner coder :) : The idea of this function is not to trade, when last trade was closed with a loss: so a()=0 -...
Hello, How can we code a Macd and Stochastic Cross into an Expert Advisor. For example, if we have the Macd and the Stochastic in a same windowand that we want to open an order when the Macd signal goes over/underthe Stochactic main ? I have studied arrays but i don't see how we can do it.
If 2 or more data points in a range have the same highest price or lowest price for the range, will the newest bar be returned?
fftremblay
Hi everyone, I need your help to understand something. Why on earth when I use this file "s_wininet.mq4", I have 4 pop up asking for my authorization to use the different wininet functions and when I use FFCal.mq4, I don't have any pop up while it's using the same functions ?? Thanks for your help....
Notice to Members I-09-10 April 13, 2009 Effective Date of NFA Requirements Regarding Forex Orders NFA has received notice that the Commodity Futures Trading Commission has approved new NFA Compliance Rule 2-43 regarding forex orders. The prohibition on carrying offsetting transactions will be...
Hello, I need to create a very simple indicator that divides volume by other indicator. Could someone, please, help me? I am just starting programming in MQL. Thanks, Miguel
HELLO FRDS I AM USING FRACTAL INDICATOR IN THE PLATEFORM ON A 4 H DATA 2 QUESTIONS FIRST ABOUT FRACTAL IS IT POSSIBLE TO HAVE A CODE WHERE I CAN CUSTOMISE THE NUMBER OF PERIOD/CANDLE THE FRACTAL STUDY USE ? MEANS INSTEAD OF 5 BARS LETS SAY 13 BARS ??? WHAT DO U THNIK ABOUT IT ? SECOND ON THE SCREEN...
I am testing an EA in demo but the comment and print functions do not work. The EA compiles successfully but nothing is ever printed in the journal, and no comments in the top left of the chart. The EA is loaded successfully an initialised and that's all. int...
  ADX EA (2)
Is there an adx ea that works. Please send thanks
Im trying to find the resistence level of the last 100 bars to use for a stop loss in an EA. I have tried to code and havent been successful with it, can someone please help me code that? this is basically everything I know Im doing right....which isnt much. int x = (100); for (int i = 0; i<=x; i++)...
My EA is set to trade only at certain times during the day (not between London close and Asian open), but I cannot get this to work in the strategy tester.  I thought I might be able to use iTime, but don't know how to get iTime to return values for "hour." Does anyone know how to get the "hour"...
  New UT . ??.. (2)
UT... M1, M5,...MN.... these UT are so old ! All other platform now allow us to get x ticks, x seconds, x minutes, x volume, ... I think that MetaTrader has to get performed, I 'ld so, but for now, I have to learn other language to make my system. I didn't know where saying that, so I write this...
  Fapturbo (33   1 2 3 4)
Can someone help me with setup of Fapturbo14 ?
Is there a way to position the comments on the top right of the charts as opposed to the top left?
What is wrong with this IF statement. It doesn't seem to work properly. if ( (Hour()== 7) && (Minute() >= 58) ) { }
I need some help in writing the code to open multiple orders in an ea I wrote. It should be able to open another buy, or sell order whenever conditions in the ea are met. Also, how do I place it in order to continue searching through conditions. Thanks in advance.
I'm trying to write a subroutine that accepts 2 parameters(Percent, Lots) and return the number of lots to close based on a percentage of the current trades lots size (CloseLots). The issues are as I see it, the simple (Percent x Lots ) calculation can return values that are not valid when divided...
  Over trading (1)
I have back tested many EA's over the years and one problem i find in alot of EA's is that they can "over trade". I say this because i have often back tested an EA and found that it would make 1,2 or even 3 profitable trades in a row and then create a losing trade or maybe even two. For this reason...
I'm somewhat new to plotting graphs, but have learned how to use the buffer and setting the parameters to draw a line, so please keep your answers on the elementary side. What I'm looking for is an indicator that will let me know when one graph line crosses another, and to create an object on the...
So in the last few weeks we've had:  - Live servers running on the wrong time for over a week as it took them a week to adjust to DST (again!!)  - Demo accounts being unavailable for 4 days Both of these caused considerable pain to EA developers & their customers, however, did "a certain broker"...
I've tried to set up an email alert and I keep getting a message saying,"Message was successfully queued! Look at journal for more information." The journal says,"Mail: 535 authorization failed (#5.7.0)" and "Mail: login to smtp.mail.yahoo.com:25 failed" or "Mail: login to smtp.mail.yahoo.com:587...
I have an EA that closes off half the lot of a trade once a target profit is reached. I would like the EA to remember which order it has already closed so it doesn't close it again. I think the only way I can do this is to save the data in a database (ticket number) and have it check the table first...
Let's face it, virtualization software is no fun. I am happily using MetaTrader on my Mac using a program called Crossover: http://www.codeweavers.com/ Everything works fantastic and quickly and it is MUCH faster than running in an emulated environment in Parallels. However, a problem has recently...
Hi, I'm trying to write a simple script to close a manually opened position, but I do not know how to let the system to "detect" an opened position. Need advise on this. Or is there any sample available? Thanks.
I mean something like exit(0) or so... I want to call it when something bad happens.
can some tell me what is the purpose of this command. what is its function
Anybody has idea why is this order executed? MacdCurrent=iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_MAIN,0); MacdPrevious=iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_MAIN,1); SignalCurrent=iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_SIGNAL,0); SignalPrevious=iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_SIGNAL...
The idea of my EA is very basic. I want to enter and exit on an EMA crossover. Entry: Long 55 EMA Crosses below the 13 EMA on the hourly timeframe. Vice versa with a short postion. Exit: 55 EMA crosses above the 13 EMA on the 30 min timeframe. I have put together some code already however it...
  3k to 133k in 6 years! ;) (13   1 2)
Holy Grail?...Noooope, not yet. But let me share my report with you guys. Honestly, no cheating, no money management with fixed lots size 0.3 lots, no risk control with fixed stoploss 25 pips. Trade only one trade in a time. Please don't misleading by the EA name, it is not only looking for 10pips...