Hey there, Ive been writing EAs for some time now, i was programming a new MTF EA, I was trying to test it in the visualization mode cuz its easier to spot wrong entries there, but when i start testing and get to 2012.01.02 23:45 (M15) it just stops creating bars.. heres the screenshot hope anyone...
Hey there:
Before this build i was able to copy indicator buffers the way the first code is written, after this build i starteg getting the error 4807 when i ran the strategy tester, so i decided to debug the code to see which one of the indicators i was having trouble with, so i re wrote the code...
Hello MetaQuotes,
What is a practical difference when symbol has either SYMBOL_TRADE_EXECUTION_MARKET or SYMBOL_TRADE_EXECUTION_EXCHANGE? The other question is - what is the proper price that I should use for them? SYMBOL_LAST?
Hello,
Could anyone please clarify when exactly are the following deal types used?? I have searched the forum, articles and reference, but didn't find an exact answer.
DEAL_TYPE_BALANCE
DEAL_TYPE_CREDIT
DEAL_TYPE_CHARGE
DEAL_TYPE_CORRECTION
In particular I am...
How do I write a script of lots in the EA to comply with the rules of the ATC 2012. That rule no IV.6 and IV.6.
IV.4. The minimum trading amount is 0:01 lots, and the maximum is 5 lots, with an increase of by 0.01 lot on every order.
IV.6. The maximum allowed total volume of an open positions...
Hello,
is it possible to get a list of all trades from along with profit (wihout having set a stop or profit target) and then to double click on trade and chart scrolls to this trade ?
I found list of trades only when visualization enabled but no method to find trade in chart automatically. Also...
Good! I'm new to MQL4 programming and mql5 and I liked to obtain values for purchase / sale of the EURUSD. I wanted to show these values in the graph window EURUSD currency. Is this possible? I tried obtrer values using the following code: MarketInfo double price = ("EURUSD", Bid); double...
Dear friends, programmers. A sad story has happened to me. I have a trading strategy that I have been using for a long time. So I decided that it's time to create an EA using it. But! Shit. If I am so stupid that I can't explain how it works, or the programmers I have written to are not so sure
Hello,
i thought that strategy tester automatically loads data from server which are needed for backest and stores those data locally and permanently (so new download of same data not required).
This seems not to be the case. When do a backttest for EURUSD 5 Minutes from 2005 to today, i get data...
Hi everyone, I just modified my first EA from a tutorial. Everything went smoothly, it compiled with no errors, and it places trades! (yay!) However the STP and TKP values are never triggered in the strategy tester (which means that all trades are closed at the end of the experiment). I've looked...
In an expert adviser, in the OnTick() function, is there a way to set a global variable that will retain its value it had during the previous call? I'm looking for a variable that won't re-initialize with each new tick.
I'm just wondering if there is any difference between the two lines of code below.... (for calculating the spread)
1:
double Spread_1=NormalizeDouble(SymbolInfoDouble(Symbol(),SYMBOL_ASK) - SymbolInfoDouble(Symbol(),SYMBOL_BID),_Digits);
_______________
2:
MqlTick current_price;
double...
I've been encountering problems with backtesting in the metatrader 5 platform specifically entering Stoploss and take profit levels similar to the problems raised by some members before: https://www.mql5.com/en/forum/7012
I'm currently using Alpari's MT5 platform and couldn't backtest properly...
Like in the topic - does anyone know? Unfurtunately CList and CArrayObj from the standard library don't allow struct type.
Hello MetaQuotes,
Just came up with a suggestion - could you consider ehancing the OnTrade() event handler? The solution that I propose is having OnTrade(ENUM_TRADE_EVENT_TYPE &event_type), which would allow MQL5 programmers to handle particular trade events (e.g. stop loss/take profit...
I've read the documentation, and looked at some examples of code, but still not sure what this guy does. Help!
Is it the same as _Digits?
Hello, how to obtain datetime from currently simulated bar when backtesting EA. Thank you
Function OnTest allows to retrieve some results from backtest by calling function TesterStatistics.
I miss some properties, like:
a) start -and end date (custom period)
b) optimization
c) simulation (tick, OHCL,etc..)
d) execution
Anyone knows how to get this programmatically ?
Thank...
Dear all, I have difficulty to write this martingale function from MQL4 to MQL5. Please help me to convert this script to MQL5. double Calculate_Lots(){ double lots=Lots; double MinLots=NormalizeDouble(MarketInfo(Symbol(),MODE_MINLOT),2); double MaxLots=NormalizeDouble(MarketInfo(Symbol()...
I am looking for a developer to create a customized Expert Trader that I can utilize while not at my desk. It is based on the convergence/divergence of two MA levels, while having the ability to buy/sell in various increments using a couple of indicators as support. I would also like the ability for...
Hi guys,
I've been exploring the strategy tester and playing with some EAs in the article and code base sections. When I backtest an EA for the first time and change the parameters for the second backtesting (e.g. stoploss,takeprofit,etc) the outcome does not change. Here's the screenshot of the...
I'm just confused, it appears to me that both CTrade and MqlTradeRequest can be used to place a trade independently. Is this true? And if so, is one better that the other?
Hello all,
I have a problem with using hidden TP and SL in mql5. How to write it ?
Many thank for your help.
When I backtest this EA run properly but when I attach EA to chart for demo account, in Expert Tab display message "cannot load indicator 'MACD' [4302]". What's it mean? And what's wrong?
Hi all guys
I need an EA to monitor another EA that are working on an account.
I need a code in meta trader to log when a position is opened/closed or changed TP/SL.
May I ask you to help :)
Thanks
Hi, I want to write data to a CSV file for analyzing. It writes effectively but only one valye, and not each value at each tick or bar. There is something i don't understand. Anyone can help me? Here is my code, copied and adapted from mql5 reference. The write code is in a function, called in...
Hello,
have problem with writing file from within OnTest
string terminal_data_path=TerminalInfoString(TERMINAL_DATA_PATH); string filename=terminal_data_path+"\\MQL5\\Files\\"+"mytest.csv"; int filehandle=FileOpen(filename,FILE_WRITE|FILE_CSV);...
Hi!
From what I understand, the take profit is use to automatic close the deal when the price reach to the take profit price. but during strategy testing the deal is not close even the price is raise over x times of the take profit price. All my deal was closed at the end of the strategy testing....
Hellow guys
I notice some huge differences in the test tick data in different terminals for example in Meta Quotes(ATC 2012 Account) and Alpari Demo Server.
In Alpari Terminal i have lot more ticks over 1,8 million for the last month and in Meta Quotes over 800 000 in the same period.
Both shows...
As long as I know, EA parameters usually for setting up take profit and stop loss.
Can EA parameters set the hour for place an order?

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.