Expert Advisors and Automated Trading - page 78

Hi, I don't know what's wrong, I'm traying to modify an open order when there is only one order opened, but keep getting this error. What can I modify to make it work? this is the code newTPb= level4bbb; newSLb= level3bbb; total; // number of open positions //--- iterate over
Hi, I am having troubles deleting pending orders when I release the EA from chart. OnDeInit() I use the following code void OnDeinit ( const int reason) { //--- // delete pending orders for ( int i= 0 ; i< OrdersTotal (); i++) if ( OrderGetTicket (i)) if ( OrderGetString (
How can I extract the name of the symbols whose chart is on the open on the screen
Hi. All I spent nearly 8 hours to find out how to change spread during backtesting and optimization. I googled everywhere even thinking of using paid software on the net. Please don't do that. MT4 has a built in feature so you can change spread during backtesting or optimization. Just sharing...
Dear team can help me ? i use this in my bot to close particial when come same price, but how i close the sum all tickets i think is better when 50 dollar is come, close all tickets and iniciate a new cycle example ticket swap price magic number 1 -10 40 0001 2 +20 -30 0009 3 0 40 1212 close all
Hello, Here is what I have done so far: #include <Trade/Trade.mqh> CTrade trade; int maHandle; int OnInit () { maHandle= iMA ( _Symbol , PERIOD_CURRENT , 21, 0, MODE_SMMA, PRICE_CLOSE ); int subwindow=( int ) ChartGetInteger ( 0 , CHART_WINDOWS_TOTAL ); ChartIndicatorAdd ( 0
Hi . My strategy work with H4 time frame , but my broker(Alpari) Time zone has different with my test broker (FXCOM), You might say why I don't register in FXCM. because it can't It does not support my country. I searched many brokers, but all the ones that accept my country all has same time zone
  Requests & Ideas (MQL5 only!)  (682   1 2 3 4 5 ... 68 69)
Terms and Conditions: You describe (you provide) the idea. I place an open MQL5 code in this branch. I place this code in a CodeBase. I specify the author of the idea and the author of a MQL5 code in a code. The coding services are provided "as is" and you use them at your own risk. List of ideas
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, I find the following fact quite shocking: I have an EA that I tested with exact same settings, exact same spread (chosen in the startegy tester) and exact same time period on 3 different brokers. Believe it or not, all three results were different. Not only that, in one broker, the EA was
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