Expert Advisors and Automated Trading - page 114

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
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
Is it possible to split a market order before it is sent to the server or are market orders immediately sent preventing any modification before being sent to the server? For example, if a market order for 5 lots has been placed, I'd like it split into 10 market orders of 0.5 lots each instead and
Hi everyone, I have been testing an EA using 1) Open Prices 2) 1 min OHLC 3) Real Ticks There is similarity between Open Prices and 1 min OHLC however there is a large difference when using real ticks. Well it's about 0.75% which I guess isn't too bad. It's just more than I was expecting. See the
I am getting the following error when I try and call CheckTrailingStopLong inside of TrailingMA and I cannot seem to figure out what the issue is. I feel like I am missing something basic. Error: 'CheckTrailingStopLong' - no one of the overloads can be applied to the function call Pertinent Code
  unsigned right shift  (13   1 2)
Hi , in javascript theres >>> and its called an "unsigned right shift" https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Unsigned_right_shift Is >> the equivalent in mql5 ? Thanks
Hi everyone, The include of the file Trade.mqh doesn't seem to be working for me (see picture include)... I still get the error 'OrderModify' - undeclared identifier I've tried all there is in the picture joined (solutions)
This happens: when I have this: if (array_st[ 0 ]<rates[ 0 ].open && array_st[ 1 ]<rates[ 1 ].open && array_rsi[ 0 ]<= 1 ) //&& IsNewOrderAllowed()==true) { valueB=array_atr[ 0 ]; Print ( "Open Order Buy" ); Alert ( "Buying" ); Orden= "Buy" ; sl2=
Hi all I am trying to draw a square from time1,price1 to time2,price2 across all open charts. I expected this to work but it only draws it on the first chart . long chartID=0; if(drawFVG) while(chartID >= 0) { RectangleCreate(chartID,"FVG"+par_temp,0,time1,price1,time2,price2);
Hi, I have managed to load the custom indicator and it partly plots on the graph when using the strategy tester. However the actual curve line does not seem to plot for some reason. Below is the code: //+------------------------------------------------------------------+ //|
Hi, I am relatively new to MT5 and having my first attempt to write an experimental EA after reading the tutorials and examples here. I am trying to initialize multiple instance of a customed indicator with different trend period using iCustom(), and trying to process the indicator value using
i want to stop expert advisor to trade after fixed profit target over account initial balance. i built EA for my prop firm account. this is the code i entered after my startegy . when i started backtesting , the EA still continues to trade. double floatingprofits ; input int startbalance = 50000 ;
I have found the help system absolutely useless and I am hoping someone can direct me to where/who can address the following issues. I have two demo accounts and I am attempting to start a bot in each one. I have VPS service in each account as well. Here are my actions and the subsequent error
Hi there, I have an EA someone made for me and whenever i try optimise the time just keeps going up and up? Example, it will start at 2 hours then go up to 10 hours and keeps going up. Why is this? Thanks
After I increase my position, I want to close all positions when the first order stops losing. How to obtain a stop loss signal
Hi, I am trying to modify this custom indicator to provide an additional result in the index buffer (trend direction). I have modified the code and the print function produces the correct value, however I cannot retrieve it from my EA. Here is the code - #property indicator_chart_window #property
Hello, I have a source code for an indicator, and I want to use it as an Expert advisor, but the problem i have that OnCalculate doesn't called automatically . int OnCalculate ( const int rates_total, const int prev_calculated, const int begin, const