Expert Advisors and Automated Trading - page 95

//+------------------------------------------------------------------+//| Script program start function                                &n...
Hi, I have coded an indicator, which creates trendlines (MT5). It is working without any problems with live ticks - but I am not able to get it working in strategy tester. Please have a look at the code below for creating the trendlines - with the test data, it should create a short horizontal line...
//+------------------------------------------------------------------+ //| GoldPro_v1.mq5 | //| Copyright 2023, MetaQuotes Ltd. | //+------------------------------------------------------------------+ //+------------------------------------------------------------------+ //| Expert initialization
Hi im new into programming and i trying to figure out how to close a position on the opposide signal but i my tries dont work i watched different videos but no reult. i know the code is a bit messy but could someone help me please #include <Trade/Trade.mqh> input int TimeStartHour = 7 ; input int
Let's say we open a position with the CTrade class. CTrade t; t.Buy( 0.1 ); What is the quickest way to get the open price and ticket of this position or detect failure? As simple as that. Thank you
In the Journal it says successfully loaded but not taking the deal of operation. others working fine but what I want and better for me not working properly
Good day fellow traders, i am looking for an EA that can calculate the drawup of all account positions based on custom comment section , and display it later either in a table , or just in a text file.I couldnt find anything but maybe someone has an answer. Thank you very much , stay awesome
Pls help a line of code, it giving error ''INIT_FAILED' - expression not boolean' and not able to compile. //+------------------------------------------------------------------+ //| Above Below MA(barabashkakvn's edition).mq5 |
Hello I’m new to mql5 I’m trying to program a program with these functions but the compiler executes only the first one If I let the buy condition come first then I only get buy orders and if I let the sell condition come first, i get only sell orders What should i do to get both orders buy and sell
  enum symbo string  (21   1 2 3)
could someone provide guidance on how to do enum symbol selction am working on an multicurrency EA that i need to enum symbols selection example i want to have enum symbol( eurusd,0) 0 is to disable
I am trying to figure out how to convert a double that has zeros in front (eg, 0.0341 or 0.00020) to an integer (eg, 0.0341 to 341 or 0.00020 to 20). All zeros before the first non-zero digit should be dropped and the first non-zero digit to the last digit should form an integer
I found out about how to implement the Ichimoku indicator in my EA, but it can only read the values that the Ichimoku takes according to the main chart. Instead, I want to find a way where I can compare the Ichimoku values to the Levels I set for it in the beginning, levels like 80, 20 that are
I am doing a number of calculations involving OHLC of candles. I want all my calculations to be reduced to the number of decimal places that appear on a given pair. For example, GBPUSD shows chart prices to 5 decimal places (eg, 1.12333) so, I would want my double values to be formatted to 5 decimal
A few days ago I'm trying to post an update of an EA on the market. In a previous thread I commented on the problem, but since the initial doubt was another, I imagine that it will not have reached many users. The thing is that I get this error. At the service desk they have not told me anything
Hi All, Does anyone know of an indicator or script or whatnot where you can place bids and offers on a DOM that is situated on the chart? Or maybe some other way where you can see the bids and offers in the futures markets? I know mt5 already has a DOM window but I was wanting something directly on
Dear All, I'm attracted by the world of automated trading and have started to study Mql5 since 5 months. I have read a lot of documents, articles and am trying to write my first simple EA as training. I fixed all errors and warning but it does not issue Orders. I'm checking it since a week but
this is my code and it is not placing an order:- import MetaTrader5 as mt5 import time mt5 .initialize() risk_percentage = 1 .0 balance = mt5 .account_info().balance risk_amount = balance * ( risk_percentage / 100.0 ) while True : candle_data = mt5 .copy_rates_from_pos( "XAUUSDm" , mt5
[Deleted]
  Never miss Ticks  (13   1 2)
Hi everyone, so I made a multi-symbol and multi-timeframe EA but the backtest and live results are different, some trades are missed on the live trade. How can this be fixed? Also the trailing stop seems to hit earlier compared to the backtest. Should I just make the EA single timeframe and symbol
How to install Set Files provided by the author on EA for specific charts?
Hello Sir I am trying to get the indicator bufffer details to my EA, but I am unable to get it, why? In the strategy tester visual screen all details are available but in the EA file I am not getting. The Super signal indicator code is as follows: <Incorrectly posted code deleted> In my EA I am
I need a help how to lock my EA/Script based on my login account number and one broker only such as "FXDD" ? example: my login number in my broker "FXDD" is 12345 , and I want my EA/Script can run only in that login number and FXDD broker. please help NOTE: better if you can give me an example of
Hello, everyone. My name is David, and although I am still learning MQL5 . I am having trouble getting my bot to close out positions. I want the ask line to cancel out any buy positions on that currency pair and switch to selling when it drops below the 50 MA (Mavalue), and the bid line to do the
Hello Guys, I'm new to coding, and I have this question; I'm trying to create support resistance expert; it draws 2 lines on 5minTF if the conditions are met; however, the lines keep moving ( I want the lines fixed, and if there is another signal, I want to draw extra line , and so on). How can I
Dear fellow traders, after closing and reopening mt5 , pass number disappears from all my optimization result tabs as shown in the picture. Any idea how i might resolve this ? Thank you very much for your support , wishing you all sort of great things for your future
Hi there, I'd like to know any MQL4/5 function to get commission fee before open order. Thanks in advance.
Hi, I found that in MQL5 there's PositionsTotal() and OrdersTotal(). From the documentation PositionsTotal() returns open position, does it means that PositionsTotal() only count buy and sell order while OrdersTotal () also count stop and limit order
Hi everyone , I am on the lookout for anyone that might be able to help me with an idea I have that disables completely market executions and only allows me to trade with pending limits. I currently use a expert advisor to place my trades but want to completely take away the ability to execute at
hello guys help me ! I need code for EA if some moment write data to file
I found this bug when using EnumToString() to display the swap calculation mode of a symbol. #define PRINT(A) Print ( #A + " = \"" + (A) + "\"" ) void OnStart () { Print ( "Build: " , TerminalInfoInteger ( TERMINAL_BUILD )); PRINT( EnumToString (( ENUM_SYMBOL_SWAP_MODE )