Expert Advisors and Automated Trading - page 89

I have isLogging parameter in EA to indicate whether calling Print() or not. I turned it off but failed to pass validation of MQL5. Then I removed this parameter, I can pass the validation. But I want to log something instead of turn it off. May someone advise how to fix it wisely? e.g. can I clean
Hi folks, got an issue with an self programmed EA. After opening my position my EA is advised to add a SL to the position. But I always get the hint below:  "2016.08.17 10:29:39.064 Trades '3895623': failed modify  buy 0.00  sl: 0.00000, tp: 0.00000 -> sl: 1.11690, tp: 1.15690...
Good day codders, I want to get the ema value of the price I stored in an array, please what is the best way to do it in mql5? this is my code below //copy price to an array using copybuffer MqlRates barsPrice[]; //ArraySetAsSeries(barsPrice,true); int copied= CopyRates ( Symbol (), NULL , 0
I have been experiencing bugs in forward optimization for a while now and I am trying to identify the problem (post about bugs: https://www.mql5.com/en/forum/454524 ). The only error message that shows up says in the journal tab is " x forward passes not processed and returned to task queue". If I
double prev_buy, prev_sell; bool Enable_Trade = true ; void OnTick () { double buy = 0.0 , sell = 0.0 ; double atr = iATR ( Symbol (), PERIOD_CURRENT ,ATR_period, 1 ); Check_Time(); buy = iCustom ( Symbol (), PERIOD_CURRENT , "SuperOsmaArrow"
I need some help from an experienced developer. I would like to do the following: 1. Create a database in memory in "OnTick". 2. Do one query from defined StartTime to Timecurrent() and copy all the transactions to above database. Benefit is much less interaction with main server, less lag and
Hi guys, i have a problem with my simple expert advisor, it gives alerts whenever an inside bar forms as shown in code below but the alert rings continously until the next candle closes. how can i stop it to make it only ring once?? Thanks in advance
I've looked for any documentation on what's under the hood of this function with no luck so far. I'm trying to calculate required margin for upcoming positions, and OrderCalcMargin() gives me a different value than the standard calcuation that I'm digging up everwhere else on the web. I'm currently
Hi all. I have been using MT5 for trading my funded account for about 8 months with very little issues. I have a macbook, I use the downloaded MT5.dmg file specifically for mac. I have just started getting into EA's, and purchased a few. It seems that the windows version of MT5, once you open the
Hello, I read many threads about this topic but they are of some years ago and I want to ask about the actual situation in a more clear way. I want to develop an EA that is reading the values of the economic calendar and trade. My questions are: 1. How fast does the mql5 economic calendar give the
Hi Everyone, not entirely how this works since this is my first post:) Everything in this EA works fine, i tested it all multiple times. The only issue lies in the createObject. It works fine when i create objects just for one symbol which i make corresponding in the strategy tester although when
Dear all, I hope I landed in the proper section with my question. Here is the story. I was back testing some MT5 experts I developed on various instruments, and when I came to EFA, iShares MSCI EAFE ETF (EFA.arcx), I noticed that my experts behave strange, to say the least. Sometimes they yield
Hi, I have a strategy that I want to separate between settings of long position and sell position. To simplify the process I will put a 2 same EA one with long position trade only and the other short position trade only. All the other parameter is the same including OpenPositionTicket[] to store
Hi, Im getting Invalid Price error in Validation to publish my EA. Looking at this it looks like it's not getting the price. My code regarding the order is below. In fact, it is working normally in backtests and real trades. Pls, somebody help me. request.action = TRADE_ACTION_DEAL ; request.price =
I have been testing numerous indicators, and for some reason two indicators got stuck in the chart of the STV. Now each time I open the STV, the lines of that old indicator still display. IS there a way to remove them?. Why would indicators get stuck (become orphan) in the STV? May be the original
Hi Could somebody please help me? i am trying to get the below code to compile in mql5 and keep receiving 2 errors for expression is always false for line number 44 and 66 (I have highlighted below) //+------------------------------------------------------------------+ //| Expert initialization
Utilities seem to load as EA's and testing them from source code works fine if you test on live data. When back testing, they may not execute any trades and then closes after period has run through. I have seen this with DEMO utilities that do allow trading (with manual intervention) but you cannot
Hello everyone, I have been testing the [product name redacted] EA on a demo account for a month. I do not know how to code. I have had mostly very profitable backtests, but for one month that is profitable with certain settings, the next month blows the account because of a big continued draw down
input double RiskBalancePercent = 1 ; double Ask; double Bid; double AccountBalance; double TickSize; double TickValue; double LotStep; double TP_Calculated; double riskpertrade; double LotsBuy; double LotsSell; double RiskPerRewardRatio = 1 ; ///get price Ask = NormalizeDouble (
The EA has been started already. the system is running on a fibo trade sytem, multi timeframe of 15 muniutes and 5 munites for entries. and the sl and tp. input parameter done already. the major frame work done already. remaining is to place the logic in the on Tick Function (OnTick), compleation of
  Equity protector  (1)
Hello i need an expert adviset that is for equty protection. Example: I have 1000 usd on my acc,when it reaches 900 to close all the trades,can you please tell me how to do that
I have two symbols running three EAs each. Each EA with a different magical number. I want to know which EA is the best, I want to see the final profit of each one since it started running. On the history tab, I can select each symbol individually, but it lumps all of the EAs together. I can add the
Hello guys, Does anyone know what's wrong here, I just copied the codes from the MQL5 help document to my first python script and tried to run it. But I keep got this error message: from datetime import datetime import MetaTrader5 as mt5 # 显示有关MetaTrader 5 程序包的数据 print("MetaTrader5 package author
Hi i want create EA that calculete entry volume for each postion according the risk percentage. i use belowcode: Input_Volume= (((UserBalance*(Risk_Money/ 100 ))/(Stoploss_point/ 100 )) * ( SymbolInfoDouble ( Symbol (), SYMBOL_TRADE_TICK_VALUE ))) / ( 100000 / AccountInfoInteger ( ACCOUNT_LEVERAGE
Hi all, If you're willing to take a moment and look I'd like to get some feedback on if there's anything I missed that may cause problems unforseen to me down the road. In particular, one thing I addressed in the MQL4 version was refreshing rates within the 2nd for loop, since I had a couple
hello coder's. please am following a strategy that applied the Macd indicator on 10pips renko chart on tradingview. So now am trying to build an MT5 EA for the strategy, but unfortunately there's no Renko chart on MT5, However, I downloaded a Renko indicator from
i need to draw fibo on chart, But cant be adjusted Level as desired
Hi, I have a working bot with 0 errors in Meta Editor. It uses Boom300 Symbol from Deriv. When i upload the file to the market it gives back errors. It will give back errors for EUR/USD as the verification is done in that symbol. I set the bot to work for Boom 300 index. I want to put it on market
Figured this may be worth a shot. I coded a multi symbol ea, running off 1 min data, trying my best not to have something that's curve fitted. In optimizations I can get good results, but the large percentage of my forward testing (90% +) all loose money. Just wondering if anyone had some insight to
Hey gang, I'm trying to get my comment from the most recent deal in my trade history. All of the values I'm trying are returning fine except my comment. ulong ticket = 0; ulong dealHistory = HistorySelect(0, TimeCurrent()); ulong lastDealTicket = HistoryDealGetTicket(HistoryDealsTotal() - 1);