Expert Advisors and Automated Trading - page 154

As the topic title. I'm developing an EA and am having a hard time finding a solution for "news" timing. Those of you who have been through and experienced, please help. Thanks
Hi, I am new at posting to these forums. I followed the tutorial on the link: Step-By-Step Guide to writing an Expert Advisor in MQL5 for Beginners - MQL5 Articles It has the "My_first_EA.mq5" file at the end. When I run the Expert Advisor in Debug > Start on Real data, It does not allow me to
Hi to all, I'm validating my first EA, but i'm stuck in this phase. I'm getting this error but if i run on EURUSD, NZDUSD etc etc, on the tester i'm getting the orders placed: Do you have any idea on how to solve this? Many thanks
it work at strategy tester but error in automatic vaildation void trailing() { for ( int i = PositionsTotal () - 1 ; i >= 0 && ! IsStopped (); i--) { if (m_position.SelectByIndex(i)) { if (m_position.Magic()==MagicNumber) { double pos_price
I'm writing an EA that I plan to publish. This EA includes my own versions with modifications of some indicators in the Indicators\Examples folder, including three that are not in this folder - SuperTrend, TSI and Keltner Channels. All the code is my own but the algorithm used is the same. Do I need
Hey, So currently I have been testing my EA on multiple currencies using the strategy tester . I also export data for each pair manually using the excel output function to store specific data.Build model 3550 I noticed that this creates agents in the Tester\ path, such as agent 1, agen 2 ...., And
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