Expert Advisors and Automated Trading - page 91

Hello everyone. Am new to MQL5, please can someone show me some mql5 code that can do the following: pick the first candle of the day, check if it's bullish or bearish. Let's call it candle A, If candle A is bullish then check the previous two candles to it if they are both bearish. If yes, then
I can successfully place order and retrieve the ticket id by result.order, but when i try to close the order always get invalid request 10013. Tried to close the order 2 ways. With the below function CloseTradeOrder AND using CTrade.OrderDelete( result.order ). Here goes my code: void
Looking for a script like below example (done for indicators) to remove and EA from the chart: Scripts: SD Delete Indicators - Indices - Articles, Library comments - MQL5 programming forum I tried following but ExpertRemove() does not work on a script. ExpertRemove - Common Functions - MQL5
Hi Friends, Im trying to upload a Trade Manager ( Utility ) and I get the following error message - What can be the issue ? Its a Utility and not an EA . test on EURUSD,H1 (netting) there are no trading operations test on XAUUSD,D1 (netting) tester takes too long time strategy tester report not
I've been google and searching in the forum but still not able to find the solution, what i need to know is how to get the reserved margin PER position, like: Position 1: 50$ Position 2: 75$ Position3: 33$ ... You get the idea, important, i'll have DIFFERENT symbols too. Thanks
Hi, Is there an existing EA that will not allow opening new trades if the risk of existing and new trades goes above a threshold level. If there is a already a robot for this, then good. Thanks ckm
I'm new to MT4/MT5 learning things with doing some project on each concepts can anyone tell me how to create a Forex trade management tool for MT4 which will continually move a trailing stop loss based upon when new higher highs or lower lows are being formed for that particular currency pair. When
I'm new to python and mql5, I'm teaching myself both currently. Can someone explain why this code always prints volume equal to 0? (blocked my user & pass for my mt5 import MetaTrader5 as mt5 from datetime import datetime mt5.initialize() if not mt5.initialize(): print(f"initialize() failed
Hey guys, I have purchased an MT5 Expert and I am trying to attach it to a chart but it removes the EA instantly and I get the following error message in Experts tab: 2023.06 . 15 21 : 26 : 55.482 Gold High (XAUUSD,H1) ERROR_TXT IN WebRequest 2023.06 . 15 21 : 26 : 55.482 Gold High
I have used Strategy Tester in MT5 and it gave me invalid open prices, while showing 100% history quality! Before placing a trade I have checked that ask and bid are not zero. As you see on the following screenshot. The open price of EURGBP and AUDJPY are showing 0. And based on this open price the
Hi. I use this void to open my trades and i get error 4756 which from what i understand is invalid stop.BUT i do not set either sl or tp. /////////////////////////////////////////////////////////////////// void SendOrder( string thissymbol, double found, ENUM_TIMEFRAMES TF2 , double buys, double
Hello MQL5 community. Please I'm very new to MQL5 programming . I want to create an EA that opens a buy and sell pending order on each 5min candle that has closed. The EA starts at the first 5 mins candle of the day that has closed , pend a buy at 1 pip above the high of this first candle that has
  Robot by GPT  (4)
Hi all. Always burned with the idea of automatic trading. I myself have never been a programmer, and even when I tried to get into it, none of this worked. But then I found out about the all-smart Gpt chat that even writes code to disk. After asking the right questions, he gave me a trading
I spent hours optimizing in mt5 and ran a single test based on one of the results. When I tried to run other results and that same set again, the EA does not place any trades. Does anyone know why this happens?
Hi, I have a strategy that will open limit order at multiple price point. This time I tried to use switch case operator in my code, here's the result: if (InpLotMode == LOT_MODE_EQUITY_RISK_PCT) { for ( int i = 4 ; i >= 0 ; i--) { double price = 0 ;
  OpenCL loaded?  (3)
Hello, I have no idea of why OpenCL is loaded. Can someone help? I didnt do anything to load OpenCL
  Emulate Slippage  (3)
Hello, When I click on "Emulate Slippage" at MT5 backtest, I dont find setting relate to slippage emulating, can someone shed light on how to set this
Hi, today when I opened mt5 strategy tester I am getting an error, while it was working fine when I turned off my pc last night. When trying to backtest I get the message "connection closed" on core 1. I have tried to install a new mt5 terminal but I get the same error message. Does anyone know what
Hello! I would like to obtain the maximum and the minimum price of an asset from a specific time range, lets say I want to obtain the max and min between 0:00 and 06:30 AM. How can I retrieve that? Thank you
Hi, how can I get the value of the stochastic ? I'm using this: int iStochasticResult1 = iStochastic ( _Symbol , PERIOD_CURRENT , Signal_0_Stoch_PeriodK, Signal_0_Stoch_PeriodD, Signal_0_Stoch_PeriodSlow, MODE_SMA , STO_LOWHIGH ); //- is a function that returns the symbol name of the current
hi community, I cannot open position with SL direclty. [if I entry the value as 4th position - system doesnt accept] if (!trade.Sell(lots, NULL , bid, 0, 0 , "comment" )) Print ( "error on sell open position" ); so I add BuyStop afterwards: if (!trade.BuyStop(orderLots, buyStopPrice, _Symbol
  strategy tester  (6)
Hi all the strategy tester always stop after two week (no more than 10 days of strategy simulation even if i asked to simulate the strategy on 4 may to 29 may ) anyone know why? which are the limits on data calculation? thanks
i having an few problem which is first i change abit an code then the EA cannot start trading anymore , the journal is running the chart only , second issue is if opened an buy/sell order,then closed order will direct open another order, my code to trigger open trade which is refer RSI indicator
I have written my first trading robot using mql5 and tested it on the demo account AMP Futures have provided. As I was trying to run the robot on the live account all the pending orders have been cancelled immediately after being accepted by the trade server. So I have written a small piece of code
Hello everyone, I want help how can I code an EA that open a lot 0.21 then close the partial profit or loss of 0.20 instantly then let the remain lot size of 0.01 to run until take profit ? I want all my position to be opened this way. Thanks in advace for you reply
Hello everyone. Is it possible to set up/create an EA that "never loses money"? I've recently stumbled upon such a thing but it simply looks too good to be true. Does anyone know of such system? Any recommendations? Thank you
Hello everyone, I have recently designed an automated trading software for myself and encountered an issue during live trading that I would like to share and seek solutions for. When I use the Virtual Private Server (VPS) provided by the MQL4 platform, my trading positions are automatically closed
#include <Trade/Trade.mqh> CTrade trade; input int stoploss = 5 ; input int takeprofit = 3 ; int candleG; //+------------------------------------------------------------------+ //| Expert initialization function |
Hello everyone , i wondered if i could get some assistance or suggestions here, Im very new to coding and have been studying it for just 5 weeks i have wrote a code which works more or less, one problem with it is that sometimes it will enter two open positions. For example it can buy to open a