Expert Advisors and Automated Trading - page 145

In MT4 strategy tester EA enter and exit in the prices that did not even existed.why this happen
[Deleted]
Hi, My dad is trading daily and I want to help him. What he needs is auto-creating opposite order whenever he closes one - for example: if he has closed buy EUR/USD order with 40 points of profit on let's say 1.05865 now what he needs is to create opposite order (in this example SELL) on the level
  VPS  (16   1 2)
What's everyone doing for running multiple MT5 terminals on a virtual Private server
Hi, I tried to find a total profit that comes from buy and sell order. To calculate total buy and total sell I use this code, //calculating total buy profit totalBuyProfit += position.Profit() + position.Swap() + position.Commission(); Print ( "buy profit: " ,totalBuyProfit); //calculating total
i wanted to check my code below with the community if i did it correctly so that if a user sets in the input variables \\ Global input section at the top of my code. input int TimeStartHour = 21 ; input int TimeStartMin = 0 ; input int TimeEndHour = 9 ; input int TimeEndMin = 0 ; that the time it
Hi, I need to use the same ATR calculation from trading view in Metatrader 5. This is the code I have so far, it work, but is not getting similar results with Trading View. I know the data is slightly different, but my results in the strategy are very different and I have checked everything, the...
[Deleted]
Please help to identify why this warning message is coming and solution to same. void CStrategy::RebuildPositions( void ) { ActivePositions.Clear(); ENUM_ACCOUNT_MARGIN_MODE mode = ( ENUM_ACCOUNT_MARGIN_MODE ) AccountInfoInteger ( ACCOUNT_MARGIN_MODE ); if (mode !=
Hi The test code below opens a buy trade at market price with a stop loss and take profit price 10 points from the market rate. If the market rate returned from the broker differs from the original market rate requested (ie. slips) the test code below uses PositionModify() method to modify the stop
Hi all, as per the object i'm trying to select the pair on wich run an EA from a drop-down menu. I've already done this, in order to select the type of order, if is a Sell Limit or Buy Limit: enum intOder_Type { Sell_Limit = 3 , //Sell Limit Buy_Limit = 2 // Buy Limit }; But i
[Deleted]
Everyone says, especially from manual trading, so as not to complicate trading (eat, sleep, trade) :) it is enough to apply simple rules: trend, eg EMA, price action, trigger, sl and tp. Repeat this a great number of times and the profit will come. I try to check it somehow, and so far I have no
Hi guys. I want to run an optimization inside mql5. now , I know that it possible to run a metatrader with a default value in optimize.ini file and use it's report file. but it's not ok to do that for multiple times. Does mql5 have any method to run optimization and return the results without
Good morning, I will have a Robot to code but before describing my need to Freelance programmers I wanted to know if MT4 or MT5 were able to do this: Roll out a strategy (such as an entry on the crossing of the short and long moving averages) With a TP determined from the last 40 trades made
  Close at Total Profit  (14   1 2)
hi, i'm searching an expert for Mt5 that can close all the orders when a monetary total profit is reached. some ideas? thanks
Hello. When I run an expert on a chart, whenever I change the time frame, the expert runs again. What is the problem
Hi .I copied a signal and using it , I want enable and disable Signal sometimes with Expert advisor in MQL5 . In the days when the news is economic I don't want Signal open positions and i not have any time access to VPS for enable or disable Signal manual . how can I select Signal in mql5
I use CopyClose() to create an array containing the Close price of the last 100 bars. How can I create an array containing a Moving Average for the last 100 bars
How can I get the rectangle to show up on top of the bars instead of behind them? Setting the zorder does not seem to work. int bars = 7 ; ObjectCreate ( 0 , "basepoint" , OBJ_RECTANGLE , 0 , TimeCurrent () - ( ChartPeriod ( 0 )* 60 *(bars))- ( ChartPeriod ( 0 )* 50 ) , iOpen ( 0
Hi there, I wrote a code to partial close orders else in profit or los at specified distance or current profit/loss by equity. The problem is that expert's currently partially closing last ticket not each one separately, I mean for example: First order: 0,03, second order 0,05, partial close 1/3
Hi everyone. I'm a newbie of EA trader. Actually, I'm not using the EA in MT5, but storing the data csv out from the MT5, using my own Python engine to backtest and develop strategy. Lately, I was trying to implement strategy with day bar which potientially could lowerize the effect of transmission
Hello, I've been trying to add a true/false input for use of time filter, however i get the below error. Probably missing something obvious. Any help is greatly appreciated. 'fCheckTradingTime' - Wrong parameter count inputs input bool useTradeTimeFilter = true ; input string InpStartTime = "01:00"
can someone please give me MQL5 equivalents for the MQL4 functions below: IsTradeContextBusy() RefreshRates()
I am coming to you because I want to create an EA by a freelancer, but I would like to know how it works if I want to include two indicators that are on TradingView only? How do you act when I say for example "I want the RSI TDI indicator"? Where do I look for the source codes of the chosen
Hey, An EA has been running on a demo account for a couple of weeks. However, when trying to backtest the EA over the same time period the results don't match. How do you set up backtesting (or the EA) so that the results match
I was testing an expert . in two modelling "Every tick and Every tick based on real ticks" . The results are completely different. I thought that the overall result should be only slightly different. If the results are so different, why do we need to use "every tick"? After seeing this difference, I
Whenever I backtest this script, It wont open any trades...why is this happening??? #include <Trade\Trade.mqh>; CTrade trade; int input length = 20 ; float input stdv = 2.0 ; double input tpPoints = 10 ; double input slPoints = 40 ; int boll = iBands ( _Symbol , PERIOD_CURRENT ,length, 1 ,stdv
I have a global variable ulong posTicket; and on the onTick function I use this condition to open a trade if(posTicket<=0) { trade.Sell(lot_size, _Symbol ); posTicket = trade.ResultOrder(); } Using a print statement I found out that the global variable does not hold the ticket value and is 0 at
Is it a good practice to set a random large size for your arrays, I'm converting an indicator from mt4 to mt5, the code compiles with 0 warning ⚠️ and 0 errors. But the expert tab screens array our of range. I don't seem to understand exactly what's wrong. What's your advice on this
I use this to get an array of the highest bar prices: copyed = CopyHigh ( NULL , 0 , 0 , 5 ,clpr); I use this to get an array of the lowest bar prices: copyed = CopyLow ( NULL , 0 , 0 , 5 ,clpr); How can I get an array containing the average of the high and low? Thanks
Hi, I will like to know if I can create or add an indicator or strategy to a tick chart for EURUSD