New article Several Ways of Finding a Trend in MQL5 is published at mql5.com: Any trader would give a lot for opportunity to accurately detect a trend at any given time. Perhaps, this is the Holy Grail that everyone is looking for. In this article we will consider several ways to detect a trend. To...
Does anybody know how to find and select (in SIMPLE WAY) last closed order in OrdersHistoryTotal()? Any function how to do it can I please?
[Deleted]
when you get information like this Previous session overview The pair Euro against the U.S. dollar traded during the Asia session between the highest level at 1.27670 and the lowest level at 1.27250, while the pair trading now around the level of 1.27366. The pair Sterling against the U.S. dollar...
lets say i have 3 currency pairs eur/usd, usd/jpy and usd/chf and running on them the same EA. how can i close all orders only on 1 chart? i tried with these code, but didnt work out - it still closes all the orders on all charts... anybody can help? void string Symb=Symbol(); if(Total>0)...
[Deleted]
hi guys, I'd like to use the following code as a static variable but it seems like changing at every new tick. I'd like to have the Opened position's price as a static number. any thoughts about this issuse? many thanks in advance! while(Total==0) { if (x==1) { OrderSend(Symbol(),...
The Canadian, unlike "super-majors" like Eurobucks or Cable, is not in a clear correction. If you look at the H4, it looks like a diagonal 3-3-3-3-3 up, in which the Canadian is close to (or has already started) the fifth wave. Here's the drawing: The horizontal lines are my sells. They are not to
[Deleted]
I need help to write second etc. lines of values. Just what to be added to the code? Thanks a lot. int TotalBars; int Handle; string Val; if(TotalBars<Bars) Handle= FileOpen("E.txt",FILE_READ | FILE_WRITE,';'); if(Handle>0) { FileWrite(Handle," High"," Low"...
[Deleted]
Thank you to all who can offer advice. I am considering buying an HP Tablet which operates the Microsoft XP Tablet version of Windows. Note - TABLET ver., NOT pc. Does anyone know if MT4 Mobile will run on this Operating System? Thank you again.
When you set TP and SL, say for a buy order, should it be Bid +/- TP/SL, Ask +/-, or Bid-SL Ask+TP? I know this seems very basic and to some of you it may seem obvious, but i'm not really a trader.
Ok, so after developing what i think might be a somewhat useful EA and getting acceptable backtest results, I'm ready for forward testing with a demo account. There is only one problem, the EA is not trading at all, even when conditions are met where it should trade. I'm using vista home premium x64...
Hello! This code works ok. Order has no TP and no SL it closes when adxplus and adxminus cross. extern bool Close_at_ADX_change=true;if(adx>ADX_more_than && adxplus<adxminus && Close_at_ADX_change ){ ticket=OrderSend(Symbol(),OP_SELL,Lots,Bid,3,0,0, "EA",MagicNumber,0,Red);} But...
[Deleted]
Hi, logging output to a file using simple FileWrite. I works well in real mode. However it does not work in backtesting mode :-( Has anyone any idea. Any help would be appreciated. My code: fh = FileOpen("mydata.csv", FILE_CSV|FILE_WRITE); if (fh<0) { Alert("File opening failed:...
Please give me code for how to calculate total open orders
[Deleted]
please can some one help me put an alert on this indicator.it helps place stop loss and it has performed with my strategy.
[Deleted]
Hi guys, Before saying everything, please note that I'm not an experienced EA program designer however I've got some other experiences. I've written an EA recently which does not seem to work properly. The problem is that it does not change variables however I wrote the change statements in the code...
[Deleted]
From what I gathered so far, most of you are expert advisor designers seeking to build the most efficient EA so that you can sell the EA to the general public. In reality, however, that does not make much sense because, if your EA were to work so well, you would not care about trying to make a
[Deleted]
Let's take an exemple. I want to buy 1 lot of EURUSD. I have a balance of 5000 EUR on my account. I need 300 EUR of Margin to open the lot. The spread is 5 pips (50 EUR). I open the position and I check my equity and my balance just after. How many EUR will be in my Equity account? 5000? or 4950
[Deleted]
hi i wrote this code but it return -1 ... please help me ... fran=OrderSend(Symbol(),OP_SELLLIMIT,LOTSIZE,Bid-10*Point,Slippage,Bid+20*Point,Bid-20*Point,"My Sell Position",60*60*24*2,0,Red); Comment("Position AT : ",fran);
[Deleted]
I just had a quick question: when running multiple instances of MetaTrader, will the functions within an EA only work on that instance? For example, if I have two positions open (with two different pairs) and I have an EA that will close them when the Accountprofit() reaches "x", will that only...
I am willing to trade a really good EA (under construction) has in past tests shown as much as 98% winning trades, in exchange for some help in optimizing indicators. I have a large collection of indicators that I have created to serve this EA, but I fear that my skills in indicators is weak. The...
[Deleted]
I am trying to color fully the area between two lines in a similar fashion as the Ichimoku cloud,for example, and to do this without hiding the candles. The Ichimoku Kinko Hyo indicator, found in the "non-programed" Indicators folder, does this if one select the largest width but I have not found...
Hello MQL4 scene, i would like to ask someone who has some freetime to create my idea in EA. Well, its really simple. Martiangle system, which means as you know double the position size if the trader is loser. Starting lotsize: 0,01 TP: 10pip without spread \ SL: 10pip without spread If the trade...
[Deleted]
Driving me crazy. I can't remove objects from chart. When on the Menu Tab across the top, I click on Charts, Objects, Object List. When I click on Objects List, the Menu Bar across the top grays out like it recogonizes the command, but it will not give me the pop up box with the objects listed. Not...
Some brokers don't like that you send a buy or sell order with SL and TP in the same line of code. It has to be done in two steps. How can i do that?
Hi, i have an ea that closes 50% of the trade at a certain tp level and lets the remaining 50% run until it hits the stop or hits the second tp level and closes the trade. The problem is i have added code to the ea so it now opens trades at a % of account balance. So for example, the ea may open a...
[Deleted]
hi is some one familiar with scalp strategy based on grid coordinate ?with 5 pips tp and 30pips sl ? i saw it on the championship 2008 by prizmal . prizmal improve the automate from other system wich won the year before . i dont think that anybody will sell the algoritm. i just want to...
[Deleted]
Hi. The issue is as much simple as interesting. How to calculate the cube root of an inputed number. We have MathPow(..., ...) only, and we can choose to get into the second parameter field a double value such as: double ATHIRD = 1 / THREE. Where THREE is a double value too (= 3.0). Any evidences...
Could anyone please assist or knows whether there is a way to extract the value of of an indicator (doesn't matter which indicator), for each hour candle? Example: Hour candle - 2010/09/06 High: 1.2918 Low: 1.2789 Close: 1.2798 EMA (3): 1.2833 - THESE ARE THE VALUES I WANT TO EXTRACT ROC (10): 0...
[Deleted]
hello Somebody can help me for codes StartTime and CloseTime? Thank you

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
If you do not have an account, please register
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.