Download MetaTrader 5

MQL4 and MetaTrader 4 - page 914

To post a new topic, please log in or register
Hi Pros, When I test my trailing stop program, the " error occured 0" appears many times in the journal. Could anybody tell me how to avoid it? Thanks a lot
What does this mean? Make a minimum of 5 non-demo trades in the first 8 months of testing (2010.01.01 - 2010.09.01) and in the 3 months of the contest
Is init() function used only one time when the expert advisor is initalized or init() function is used more times by the expert ? I ask because I don't know where is better set default values for defined variables : on init() function or as an extern value.
Can anyone point me to an article or sample of code that loops through all open orders checks for loss of -10.00 Dollars or -xx.xx and the closes only that order? I searched but can't find anything ... I'm having a mental moment coding this... Just want to close the order when loss is -10.00 or...
Hello, I could not find a way to dynamically display MA line on EA chart in test mode. It only displays at stop test time. I tried to include Custom Indicator code in EA, but I get error "SetIndexBuffer function must be called from custom indicator". ObjectCreate might do the trick. Any other method...
Is it possible to use the DDE in MT4 to Export the RSI into Excel on any desired time frame? Thank You for any comments. R
Hi there, I am battling with a part of my EA related to Ordersend... Sometimes my EA opens a second order milliseconds after the first one. The part of my EA that deals with the opening of a long order is below... if(ticketlong==-1) // If I'm not already long... {//...
  simple code (2)
some one could help me to implement a code for do this. buy and sell simultaneously after close a profit position, and close the next profit position and then buy and sell again .... The code have to close a position negatif at 1.0 for exemple. thank you
New article Functions for Money Management in an Expert Advisor is published at mql5.com: The development of trading strategies primarily focuses on searching for patterns for entering and exiting the market, as well as maintaining positions. If we are able to formalize some patterns into rules for...
Hi guys! I came here because so many want to sell me their systems based on MT4 indicators or experts... which may look nice, but I don't like black box stuff. I prefer community developed stuff, such as the Firefox web browser, for an example. Examples: www.currencymeter.com www.sniperforex.com...
I want to use metatrader to back test and analyze data of symbols that are not included in my metatrader version; I don't need real time data, only historical
Question How can you select a ticket for a specific symbol irrespective whether there are other symbols opened ie. both GBP and EUR in the terminal window? What I'm finding is that irrespective of the code below, it selects the first trade opened ie. Eur and reflects the EUR Ticket? I use the...
New article Creating an expert Advisor, which Trades on a Number of Instruments is published: The concept of diversification of assets on financial markets is quiet old, and has always attracted beginner traders. In this article, the author proposes a maximally simple approach to a construction of a...
Hi all MQL4 experts, i'm going crazy on this one! I want to make one trade per candle so use the code below to set 'newcandle' to Time[0] once a trade has been made. 'Newcandle' variable loses its' value and returns to 0 when the routine is exited - so on the next tick the routine is entered again...
I have a friend who just started Forex and he does not know how to use MT4 platform. My question is can anyone point to a link, tutorial etc. of how to use MT4 platform, test and backtest EA's. Thank you.
Passing Variable Values back and forth between EAs and Included & Library files ? I'd appreciate someone pointing me in the right direction on this, Thanks (< 8)
Will MT4 EAs work on the MT5 platform without modifications???
hi there i got a EA that open 2 trade at a time so can someone tell me how i can adjust the code to open only one trade at a time.
Hey guys, I wonder if anyone already did this calculation before... I want to know when one order is gonna be profitable so I can draw a line on the screen. The following code calculates the exact profit of one order... OrderSelect (ticket, SELECT_BY_TICKET, MODE_TRADES);profit = OrderProfit () +...
I am surprised that none has yet to bring this following https://www.mql5.com/go?link=http://www.nfa.futures.org/basicnet/CaseDocument.aspx?seqnum=2461 I would assume metaquotes would have an honest explanation? or all the crooks joining together to cheat retail/small time traders?
hi why i dont have the news tad in meta trader 4? i reinstallted the program cuple of times but it didnt help sorry for the bad english
I find a solution
After closing part of an order at a take profit level which order in the order book is selected? I know the ticket of the trade changes, and therefore I assume it's position but not sure if the trade remains selected regardless of this.
  DateTime() (17   1 2)
I am running a VPS where the time shown on the charts is different from the time input to extern variables in my EA. I uploaded the EA to the MT4 client and access it through the web. The EA uses DateTime() to convert to seconds from 1/1/70. The techs at forex.com keep telling me that it is a...
Hi Friends, Could anyone show me about the code base to create horizontal line as level at RSI 14? The line will be created at the Bottom/Top of RSI. The Bottom --> if RSI(i-3)>RSI(i-2) && RSI(i-1)>RSI(i-2), so the bottom is RSI(i-2). The Peak --> if RSI(i-3)<RSI(i-2) && RSI(i-1)<RSI(i-2), so the...
Hi, to check if a order is opened I use OrderSelect and if OrderType() == OP_BUY I assume it's open. I don't know if this is how to check if a order is opened though :P Here's the code I got, that closes any long open position:    for (int i = 1; i <= OrdersTotal(); i++)   { if (...
Hello to everyone, I live in Australia but want to use an MT4 FX broker in the USA. It normally takes about 500 milliseconds to send an order to USA broker's server and receive confirmation as to whether order was successful or failed. My question is as follows: Within my EA when I use the...
hi i would like to test a new scalping strategy main chart would be M5. so i hope 90% modelling quality will be enought to give a overview over the system. but whats more important is the spread. so is it possible to modify these parameters in the marketinfo? i am testing always in offline mode. so...
Classical EA, the good automatic transaction system have been very now few, we have the good automatic transaction system, registers www.huixin68.com
Hi, I try to open the file configuration.ini to change something like logo and website address in about menu but there are many strange character and I don't know how to change. ex., when you open terminal.exe, in about menu, you will see the logo like fxpro, and the website: fxpro.com, I want to...