Expert Advisors and Automated Trading - page 37

  backtest mt5  (7)
hello!! in my robot i see big results but in demo account no....where is problem?? look and the foto an dplease help me what need to do,thanks a lot!! lot/
im trying a basic stochastic EA which works great until it doesn't. I've put just a stop loss in the input variables clicked Ok but the stop loss doesn't show when back testing. anything silly I've missed?
folks, how do i detect if a trade transaction was a stoploss hit and that it had closed the position? some code i tried : void OnTradeTransaction ( const MqlTradeTransaction & trans, // trade transaction structure const MqlTradeRequest & request, // request structure const
MT5/Any Trade platform question - As an example, Imagine, Your Account Balance - $10,000, you risk 1% per trade ($100) You want to place a trade and your - Entry Pirce - $100 - SL - $50 - Target is $150 - Question 1 - Is it possible to split your profit in to 3 ? ( I want do this automatically for
Code compiled, with out error. but alert not generating. Is there is any method to verify and correct the problem // Global variables to store spread data double openSpread = 0 ; double highSpread = 0 ; double lowSpread = 0 ; datetime openTime; datetime highTime; datetime lowTime; double lastSpread
I tested not only my bot but famous [redacted] through [redacted] broker and i had this issue while doing so, but the code is ok, no fobidden functions, etc... No 2025 backtesting is being possible to be done. What can i do
I am wanting to run my ea on a US broker under fifo rules. the bot doesn't have to average often but when it does it can take up to 4 trades in the same direction on the same pair. all trades on the same pair and direction are all of the same size. they do no increase when it does this, it will
hello friend i have been creating an EA with a stop loss and a trailing stop loss but the thing on my first EA i uploaded on the market i was successful but the thing is im having problem to upload my second EA cause it have stop loss there is anyone with help cause im stuck but the thing is working
Hello, how can I write the expert code on my mobile
Two different charts open on two seperate tabs. If i dont want EA to run on one tab/chart I disbale "live trading" in the common tab, but this disables the EA in **both** tabs. Is it not possible to have the EA running in just the charts I choose
Hello again. I'm building my strategy and it's becoming big, and I need a better way to manage how the objects interact with each other. I'm new to OOP. Can I generate signals—events like—instead of manually checking for conditions on every signal object from the trading class? Then, the trade class
  Failed EA upload  (4)
Hi, i have a product for sale that i have updated a few times. Had some errors on update. volume and not enough money errors. Which i fixed. I have the latest version ready to update. I added EnableTimeframeTrendFilter = true; // Enable trend filter on H1 and H4 and Trading modes. Trading modes is
I created a working script, but when I load it to the chart I don't get Input Window like I get loading an EA, It loads automatically with its defaults. What should I do with it? I remember, I started learning mql5 , and back then it always asked for submission with an input window
Hello, Any expert advisor or script out there that when I open a trade it automatically places stop loss based on Previous X Number of candles high/low (Buy order the stop loss will be on previous X number of candles low and vise versa) . And not tied to any pair (open for all pairs and markets) on
Hi all, I have a question regarding the following issue: The second-generation i5 CPU delivers roughly three times the performance of a Xeon, yet their Single Thread Ratings (Xeon is 1117 vs. 1492 for the i5) don’t indicate such a large gap. What could be causing this significant performance
Hi, I have run 10 genetic optimisations across various markets and backtest / forward test periods. All the tests consisted of the same inputs. Now that I have run these tests I wanted to view all the forward and back test results, but only 4 of the 10 had the forward results saved and the forward
Hello there! :) At start ill say that im beginner writing EA's but im trying my best to improve each day. I have just managed to put all function together, at least what i thought, no error, compiling no problem. But when i put it into test, indicators load, but it doesnt take a trade, if anybody
what is name of this indicator
Hello everybody, I tried to upload new version of my EA to MQL5 market but this time code was written in object oriented style. I can't pass validation tests and there is a message that some checks I didn't pass. Specifically that checks are considering lot size. I have mechanisms that prevent that
Hi All, I have run into this weird problem from 24th October, the pending orders when placed show a magic number associated with them but when the orders get filled the open position does not show a magic number. The position is showing itself as "placed manually" when I hover the cursor over the
Hi, when I open strategy tester, there needs to select expert advisor or indicator. Is there a way I could backtest using neither EA nor indicator? Can I backtest without EA and indicator
My EA is operating with Buy/Sell Limit orders on hedge accounts. When the buy and sell positions are equals, the EA uses CTrade.PositionCloseBy() to close a buy position with a sell position with the same volume. This strategy works very well in the demo account, but it does not work on the real...
Hello I have written an expert adviser and I'm using C-Trade to execute buy and sell commands. Unfortunately the program stops after executing the buy or sell command. Would someone please help me and explain what is wrong with my code? I have uninstalled MT5 completely and deleted Metaquote data
I have an issue with some IF statements which are shown in my code below (I have taken out a lot of code that does not relate to the topic). All code highlighted in purple works perfectly, both lastSignal & thisSignal strings are updated when required. My problem is after my // Set SAR swap
For my trading strategy I use levels from high timeframes like the Daily and H4, but my trigger to enter is found on much smaller timeframes like m1 and m5. My levels are drawn on the daily with a custom indicator. I'm trying to figure out whether I can create an EA to leave running on my trigger
I'm new to programming and i wrote a code for my ea but the journal shows failed narket buy 0.2 BTCUSDm sl: 105348.0200 tp: 105349.5200 [invalid request] and i do not know what to do. this is my OpenTrade Function. void OpenTrade( int orderType) { MqlTradeRequest request; MqlTradeResult
Hi all, I have two questions regarding the Strategy Tester in MT5. Maybe someone knows the answer: Are function calls to Print() and PrintFormat() automatically disabled during optimization, or should I rather check for MQLInfoInteger (MQL_OPTIMIZATION) before using them? My EA is quite verbose
I’ve developed an EA in MQL5 for Gold , where I’m using a 5000-pip SL and TP. However, I’m encountering an issue: initially, the order fails to be placed due to an ' Invalid Request ' error, but after several attempts, it eventually goes through. I’m trying to upload this EA to the MQL5 site, but
Hi, i am new to bots and have a question... Is there a bot available to perform the following, otherwise would it be possible to create this? To place a buy stop and sell stop order x pips/points above and below the opening price of a particular candle? For example lets say i want to buy dax germany
When trading indices and cryptocurrencies, the EA robot reports an error that the margin is invalid. The contract volume in the specification is 1. Does anyone know why