Expert Advisors and Automated Trading - page 69

Hi, Im using a custom indicator, it seems to be correct, it displays correctly, but, when using it in the EA, results are not as expected. for example, I've said to the indicator to open an order, when the value of the indicator is smaller than 0, after this equal to 100 and after this smaller than
Hi I've been following the TruthfullTading tutorials on the tutorials thread as they were recommended to me, but I'm confused about differences in how he generates stops. AIUI in his Moving average example he uses the following code to calc stoploss that uses the ASK price for a BUy and the Bid
Hi everyone . I'm quite new to coding and my ea is having sucessive losses in a single minute and I'd like to make him wait until it's a better time to go on. I have had a lot of trouble using the OrderTotal to do other things because once I use it outside the order select parenthesis, I get the
  Will the EA crash ?  (17   1 2)
I've got an ea that downloaded all available ticks from a broker for a symbol . It reached 250 million ticks , and , the MqlTick structure is 52 bytes per tick. (13 gigabytes) It placed it all in memory .I've got decent RAM on the machine so it held. If someone with 8GB of RAM runs it will they get
Hello, I am seeking some advice and tips regarding an issue I'm facing with MetaTrader Expert Advisors. I have noticed that when I run the EA on multiple charts and occasionally compile the source code while it's running, MetaTrader starts to become unresponsive and overloaded. It seems to get stuck
Hello Can we make Mt5 strategy tester check only the optimization results produced by another test? For examble, we make the strategy tester produce the best results of certain Expert advisor's parameters from 1/1/2022 to current date Then we use only these results for another check to find best
In MQL5, how can I submit a new buy order when a eixisting buy position closed. (and submit a new sell order when a existing sell position closed)
Hello everyone, I hope you're well. I'm still a beginner with this fabulous Metatrader software, but I do have a small question about calculating free margin during a backtest. For example, when I have 2 positions open at the same time, 1 long and 1 short, on an initial capital of $100 I should have
Hello, I am currently creating an indicator that shows the high and low of the previous bar for an user inputted time frame. It is currently working in some scenarios, however when the input timeframe or chart timeframe is changed it can start to output incorrect lines or sometimes not even output
my computer cpu 12900k ,128gb memory, 16TB harddisk, and i backtest 5 years every tick base on real tick with 1 currency pair , it still said not enough memory to generating , even the ram only use 50% , anyone can teach me how to do? thank you for answer, i love you all
Dear all, I got interested in trading several months back, did some reading on it and realized that algorithmic trading is the way for me to go since I have a full time job and am reasonably skilled in computer programming. I picked MT5 since it is close to C++, a language I am familiar with
Hi everyone, I hope you're well, I'm still a beginner, would you have any links or tutorials to find out if it's possible to modify the drawings that are automatically generated in the inputs and outputs?, For example, modify the arrows with other drawings if it's an input or output, or execute on
Hi As per my previous post on 'Invalid Stops' I'm in the process of learning how to code EAs. I do have some transferable skills as I used to code in Borland C back in 1990, so some aspects of this process are familiar, but coding for this environment is obvioulsy very new and I hit problems with
In the following snippet, I'm trying to print the details of closed positions. However, when I tested this snippet by placing an order and close it manually on MT5, this OnTradeTransaction function not get triggered. Is anything wrong in this code
Hello everyone, I need help with adding a trailing stop to my EA. I'm looking for assistance in identifying the problem and fixing my code👇🏼. Your support would be greatly appreciated. Thank you! double trailing_distance = 50.0 ; // Trailing stop distance in pointsif(PositionSelect(_Symbol) ==
request.action= TRADE_ACTION_DEAL ; request.symbol= _Symbol ; request.volume=volume; request.tp=price- 1 ; request.sl=price+ 1 ; request.price=price;
Hello all. I have a set of txt files my EA reads to get external data, but it does not work when debugging with historical data on MT5 version 5.00, build 2980. It works when debugging in real time instead. I have been trying to include the tester_file , I am using the FILE_COMMON flag on my
I have tried to understand how iCustom works, but I guess I'm just not getting it. I'm trying to build a simple Stochastic RSI EA. I have tried using both of these indicators: Free download of the 'Stochastic RSI' indicator by 'GODZILLA' for MetaTrader 5 in the MQL5 Code Base, 2011.11.25 Free
  Optimizer issue  (2)
I optimized my expert 3 months ago Now i have to optimize my exoert again in same conditions(same inputs with same steps and ...) but now it need much more time for optimizing in compared to last time Anybody know whats happining? Thank you all
  I will write you an advisor for free  (134   1 2 3 4 5 ... 13 14)
Looking for a partner trader to create a free joint robot
Are there any tips what should be considered as a best result of strategy tester optimization's results? Should I use best result from complex optimization or higher profit result? or maybe its better to use a variant with lower DD? Who has experience in automated trading optimization
I have created a bot and its perfectly working on the tester but cant place trades in real time what might be the problem please help
I am having an issue trying to count closed trades , i just can seem to get it done . int ClosedOdersCount = 0 ; datetime TimeNow = TimeCurrent (); datetime TimeBefore = TimeCurrent () - 860000 ; long OrderType ; HistorySelect (TimeBefore,TimeNow); if ( HistoryOrdersTotal () > 0 ){ for (
I use 31 Pairs and 15 Timeframes on my expert advisor . How can i see them on Strategy Tester Report? // Symbols are in a class string symbolss[]= { "AUDCAD", "AUDCHF", "AUDJPY", "AUDNZD", "AUDUSD", "CADCHF", "CADJPY", "CHFJPY", "EURAUD", "EURCAD", "EURCHF", "EURGBP", "EURJPY", "EURNZD", "EURSGD"
if (position == "sell limit" && type == "(open now) OPEN" ) // OPEN SELL LIMIT Position ********************************************** { // Perform action for Sell Limit Open // Place the order here // Prepare
I am sharing this code with you in hope that you can help me to add the features for it to close all open trades x minutes before the news. Its MT5 If you can advice me on a feature to backtest news it would be a plus. Code Input: input string snev = "------------ News Event Filter -----------" ;
Hello, I've seen it's possible to have the profit/loss in the Strategy Tester , but how can this be done? I believe it may be making losses on the trades it is opening due to closing too quickly. Thank you for any help. All the best, little.trader
Hi I've just started learning to code EA and try and get my head around MT5, ticks, points etc, so I apologise in advance if I have done something very daft or missed something obvious! So I've been following a tutorial online that gradually developed a more complex EA. It seemed to make sense and