Expert Advisors and Automated Trading - page 186

hi, could you tell me why this code is not opening any positions? #define EMA_MAGIC 123452413534876 //--- #include <Trade\Trade.mqh> #include <Trade\SymbolInfo.mqh> #include <Trade\PositionInfo.mqh> #include <Trade\AccountInfo.mqh> //--- input double InpLots = 0.01 ; // Lots input int
Hi everyone. I' programming my own EA which opens a lot of positions on the same instrument. So far so good, but now I have trouble identifying which pairs belong together, I mean which closing position belongs to which opening position. I can add a comment when opening a position, but I can't find
Hiya, Looking to convert my CFD EA to be suitable for my spreadbetting account & was wondering if there is new terminology required elsewhere in the code or is it simply changing the lot size to £ per pip calculation? Feel like I'm missing something. Trying to write the spec now. Thanks for any
Hi, I use CustomTicksAdd to create ticks from external maket data source via a MT5 service, I checked ticks on the custom symbol chart is perfect compare to external maket data source, but I print out custom symbol tick and EA OnTick at the same time, found sometime EA OnTick is very old tick
Hi, I wanted to know if its possible that the EA wait the reversal before re placing another trade if my Buy Signal is when CCI is over 100 And Sell Signal is when CCI is below =100 Example When the CCI will hit 100, my EA will place an Buy Trade But i dont want it after it hit the SL or TP that
#property copyright "Copyright 2022, MetaQuotes Ltd." #property link "https://www.mql5.com" #property version "1.00" void OnStart () { //--- MqlTradeResult result={}; MqlTradeRequest request={}; request.action= TRADE_ACTION_DEAL ; request.symbol= Symbol (); request.type=
Looks to be very simple to code, i just need a start point from someone
import MetaTrader5 as mt5 import time account= 67602849 password = "fakepassword" server = "mt5-demo01.pepperstone.com" if not mt5.initialize(login=account, password=password, server=server): print( "initialize() failed, error code =" ,mt5.last_error()) quit() authorized=mt5.login(account
Is there any way to set these alerts from EA Code? Can you please share documentation reference, as I am tired of adding alerts manually for multi currencies
Who has experience with developing Expert Advisors that have been optimised with the help of AI? Or which Expert Advisors are already on the market that use AI to make trading decisions? It would also be helpful to have AI tools that help in market analysis of news to better evaluate the amount of
I am new to this website and found some ways to automate the trades using EA or signals. I'm not sure which one should I choose due a lot of options available in EA and signals tab. So which should suit for me as a beginner in following automatic trades, EA or signals
cannot download data history for strategy test
Hi, Since I updated to version 24 July 2020, when importing cache opt file, all parameters are missing, even I select enable all. When exporting to XML, the parameters are missing too. Please check it out. Thanks
[Deleted]
If positions total is greater than 0 I want to select last trade opened. I used the logic below but doesn't seem to work. Can someone kindly assist if (position_number> 0 ) { for ( int b=position_number;b>= 0 ;b--) { PositionSelectByTicket ( PositionGetTicket (position_number- 1
I guess the compiler knows at every time which of code line contains which statement. But there is no such function in functions list. Sometimes out of range bugs are hard to find between functions and classes. It would be convenient to have that and it should be possible I guess
Hi There; I have a need to calculate 3 bars in M15 range. the last 3 bars including the current bar to make it comfortable. I do not want to rely on Chart component as the user will change the M15 to other ranges periodically and it's part of the automated process. The purpose of the requirement is
i Created An expect that Finds Newly Created Objects on a custom Indicator And Reports that a new object has being created on Chart Code: //+------------------------------------------------------------------+ //| Object expert advisor.mq5 | //|
Is it possible to place a order that will not be visible in the order book? Or this kind of order must be a market order? Thanks for any comment
Hi, I'd like to run Metatrader 5 in the cloud and am investigating operating systems to use: I'm looking for something that is fast. Things I've looked at My laptop: i7, 16Gb RAM Runs lots of windows concurrently with an EA on each quite happily.Amazon AWS free tier: Windows Server...
I have this piece of code in a library and it works fine, I reported it in a script and "maxRiskInPrice" turns out to be 0. "Account balance" is approximately € 9500. void calculateLots(){ int stopLossInPoints = 15 ; int riskPercentage = 5 ; double pipValue = SymbolInfoDouble ( Symbol ()
anybody who knows the mechanism or the maths involved in the background that help the MT5 platform be able to indentify the amount that is going to be lost on a certain stoploss the other way to define this is how to know the amount of money that is going to be lost on a certain stoploss Let me be
Hi A simple question - can you close an open trade when using the Strategy Tester within MetaTrader 5? See the code below - when this runs it fails to close out the open position. No error is given. I have included the results from the Journal below as well so you can follow the path it takes via
Hi Guys, I have been learning MQL5 for about 30 days. I have been trying to write an EA as a learning process. I have been facing this problem , My trade always sends a requote. I dont really know how to solve this problem. Please help me. Screenshot and codes Sell codes are shown below : double
Hello, Fareed Alston here, I need to code an existing EA to close at certain of the day, on days of the month that end with a specific number (e.g. close days ending in 5; 05th, 15th, 25th) and open after time has passed (1 hour) or open days of the month that end with a specific number (e.g. open
I can't find anything on the internet about how to use those to run a command when a trade gets closed. When a trade gets closed OnTrade() should find the last closed trade. I also don't understand how i could do that from the documentation of OnTrade() and OnTradeTransaction() . Any hints to
Hi, I am looking for a simple EA that: based on MACD only lets BUY or SELL orders ( of another account/signal ... mirrored ) through! The standard MACD parameters should be adjustable. Hoping somebody already programmed this! thanx
I have 2 different EA's on different charts for the same symbol. Each chart shows the trade history and trade levels of both EA's on both charts. Is it possible for each chart to show only the trade history and trade levels for the trades that occurred on each chart
Dear I have problem to backtest EA with some broker It give me error message like below - 2022.01.23 22:03:50.459 Core 1 2021.03.22 00:00:00 CTrade::OrderSend: market buy 0.04 position #1048 EURUSD [market closed] and backtest going too slow and it give me lot of message - Is this possible any MQL
Hello, I have a function which I use often in my code. I would like to know if there is a better/more efficient way of doing this. Any suggestions are welcomed. //+------------------------------------------------------------------+ //| NormalizePrice()
Hi! I need to get the low and the high of the candle where a script is released. I remember there is a function but i don't remember the name. thanks