Expert Advisors and Automated Trading - page 123

Hi, I've recently started learning how to code in MQL5 (in fact in any coding language!), so apologies if there is a simple answer! I'm trying to write an EA to work on Dollar pairs, and want to use price data from the Dollar Index (DXY) within the code. Effectively, I want the code I'm writing for
Hi Before trying to write the code in mql5, I'd like to know that can I use both breakeven and trailing Stop in my E.A? after opening the position I want to use breakeven and then , after a certain profit I'd like to use trailing stop
Currently I am Using the Below Code In MQL4, //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ bool openURL( string url){ int APPEND
Hello everyone! I'm new to MQL5 programming and have been struggling with this issue for a while. I tried everything but couldn't get from point A to point B. Essentially, I want to loop through the previous six candles and add them to an array. However, I always get an array out of range error. I
I have been trying to replicate the following strategy which was published by ATS on January 14, 2021. The trategy uses the MACD Indicator (MACD), Average Directional Index (ADX) and Average Directional Index Rating (ADXR). Buy When MACD (MACD plot) is greater than MACD (Avg plot) When ADX crosses
Hi, when I run the strategy tester the EA works fine but the balance and all information in the bottom area is only updated when I press pause. Is there a way to make it interactive while the backtest is running
I have created a custom symbol I need to pass realtime live data to that symbol I will record live data in csv file using python What is the actual way to pass that live data to MT5 symbols Do I need to use MetaAPI or is there any other way of doing it
[Deleted]
I have a question if I have an EA which scenario will process the most ticks. #1 SCENARIO - Add a code to the EA to trade different timeframes and symbols I want. #2 SCENARIO - Open the different charts and just use the EA as it is
My stoploss code is as below, once stoploss is hit, next 15 mins EA should stop trading, how should i modify the below code if (SL_Type== 0 && NroTrade( 1 )> 0 && TotalProfit( 1 )<=SellSL*LotMult*neg){ CloseAll( 1 ); ResetTicket( 1 ); }
perhaps you can help, the following function usage works properly on my local pc but fails on my vps: #import “urlmon.dll” int URLDownloadToFileW(int pCaller,string szURL,string szFileName,int dwReserved,int Callback); #import I am trying to use it to read a price and display it as part of an
So I currently made three different Ea's through EA builder but they dot seem to be activating. Any pointers or help?? I already set it to live trading and checked the DLL settings
Hi All, I have just started learning on how to code using meta editor and I am facing an issue as described below: - For instance on an ideal sell trade; Entry Price : 1.2220 Stop Loss (SAR VALUE) : 1.2240 "Entry Price +20 pips" Ideal Take Profit Level: 1.2220 (EP) - 50pips (Stop Loss distance from
Hi there, I have difficulty in pulling my EA’s through to my VPS. It does pull the charts through, but not my EA’s. I’ve attached a screen dump of my VPS journal for reference. Can someone pleae asist
Hello guys My question is regarding the return of the deal and order number in OnTradeTransaction() in HEDGE accounts I'm using the CTrader library to perform operations Well, let's go. In this example the Expert enters PURCHASED , I check the code return and present it in the log as you can see
The following is taken from an excel spreadsheet which I use to examine my 'trades'. [I have removed some details to fit 'better']. The trade fulfilled my criteria - a breakout from consolidation. The trade was entered and closed a few seconds later - my own logs confirm the details. I check for
I have created a Supertrend expert but so i can optimize that and use it. I built it because i was trying to do the same thing on Tradingview but it was a manual process. The problem is that it takes 12 hours to do the same test that i took about 40 ~ 60 minutes on TradingView. Here is the code
I noticed that any non visual test (not an optimization pass) from an EA doesn't log anything I put in print functions, as it used to happen before. Is it a recent bug, or is there any reason for that change (I'm using build 3440)? *Now I have to write any log into a txt file instead, that solves
If I use the following code in MT5 it returns ~0 even my data is good and available from 2003, 99% model quality. This means MT5 skips all data that passes 4-500 days. We are migrating to MT5 and lots of our algorithms are based on past data. I feel like MT5 is not as good as MT4. The same code runs
I have a problem with my EA, My EA is not opneing a new position when already existing position is not closed. I want to open multiple position for a pair even if existing position is not closed. To elaborate, Example below Example EA opens a position of BUY EUR/USD at 1.0000 and TP at 1.0025 but
Hello, I can't understand why my positions don't change. The error is on the new stop loss. However, for the buy ask>new sl>last st and for the belly bid<new sl<last sl. This SymbolInfoInteger(_Symbol,SYMBOL_TRADE_STOPS_LEVEL) say me that the minimum stoploss is 10 points so i put 11 for try but
Dear community, I have build a EA last year with following code snipped: long chartM1,chartM10,chartH1,chartD1; int OnInit () { chartM10 = ChartOpen ( Symbol (), PERIOD_M10 ); chartH1 = ChartOpen ( Symbol (), PERIOD_H1 ); chartD1 = ChartOpen ( Symbol (), PERIOD_D1 ); chartM1 = ChartID ();
Forgive me if this is totally obvious to the rest of you: My experts using limit orders, never seem to take any trades at all on MT4. Is this is a known limitation? I can't find anything to suggest limit orders are not supported in backtesting, but grateful for any insight. Luck to all
https://c.mql5.com/3/395/eventimportance.png Hello, I use CalendarValueHistory to get historical calendar data. datetime date_from = D'24.10.2022' ; datetime date_to = D'25.10.2022' ; if ( CalendarValueHistory (values, date_from, date_to, CountryCode)) { //.. But the most important parameter
I have all the requirements in detail. Reply if you can code a Hedging bot. Thanks
Having uploaded an app to the expert advisor and put in the appropriate inputs for a single use, I'm only getting a "waiting for update" on a -BLACK SCREEN- Any suggestions
I tested my EA system and found that when calling the system indicator, the CopyBuffer step will take a lot of time, and the time for calling the number of 1000 and 10 is the same. Does anyone know what causes this problem
Hello, i want to remove a last limit order with python. Can who help me
if I want to run different ea on different chart, so lets say I create "EURUSD" and "USDJPY" this two ea, I open two positions from this two ea, one from "EURUSD" and one from "USDJPY" if I want to change the position SL from "EURUSD", do I need to write magic number to let ea identify it, or I
Hello is there something that can I do if I don't' want to show my indicator when I backtest my EA ? Is a mq5 code