Expert Advisors and Automated Trading

To post a new topic, please log in or register
  EA Problem (1)
I create a EA and when i compiled it, it show a 0 Error and 6 warning .But i ignore it and test on MT4 strategy tester it EA give me a good result. But i solved all warning and now 0 error and 0 warning, now i test it on strategy tester, it become a worst EA. what is the problem on it. can i run my
Hi there, since a few days I recognize that if I run a backtest there are more objects (= trades) in the backtesting chart than the EA generated. It seems that thee EA uses a different template than the "tester" template. If I apply the "tester" template manually to a chart window, then all objects
Hi everyone! So basically I'm coding an EA that places one trade depending on a given signal, and that trade runs just perfect. It places the trade when it should, and it changes the stop loss to breakeven once the first take profit target is hit. I want to code it so if the stop loss is hit
Let's say my EA is not performing very well and losing too many trades in a row, is there some way I can tell it to go sit on the bench for some time, like one hour or two (specifically) and try again later? Of course, I want to do that programatically, so it can always run unattended. TIA
I cant found the error, here is the code. i want to use this file to import in another string CheckSignal() { MqlRates PriceInfo[]; ArraySetAsSeries (PriceInfo, true ); int Data = CopyRates ( Symbol (), Period (), 0 , 3 ,PriceInfo); string signal= "" ; double MiddleBandArray[]; double
Hi all, I'm completely new to developing EAs so hopefully theres a simple solution to this problem that I just can't see due to my inexperience. The EA should open a position if there is a new candle on the 5 mins timeframe, if the trend on both the 15 mins and 1 hour timeframes (based on a
Hello guys, I'm using CopyTicksRange function in my EA to get MqlTick data for some calculations, but CopyTicksRange doesn't work when back-testing. Any solutions
Hello, for my daily trading, I am using one expert advisor as a trade assistant. Calculating the position size and the SL. Furthermore I am looking for a possibility to additionaly use an ea sending my trades as a signal to a telegram channel. I do have for this also an EA, but I can't use them
can i ask that if my ea place some orders and then i addientally close the chart tgt with the ea, when i load it back agn, the orders is still there, but will my ea recognise those previous order
Hi, I've written an indicator that works pretty well when I need to trade and want to convert it to an EA. Clearly, the indicator is using the OnCalculate event and the EA the OnTick event.  However, when I convert my indicator to an EA it doesn't work as I the original indicator does and I...
Hi Guys long time I am looking for a way for hide and un hide indicators are on chart but couldnt find a way , and now it is my quastion , can we change Visualzition of Custom Indicator from all time frame to Monthly with script ? with this way custome indicators will be hidden in 1M - weekly time
What it is: Below, you'll find my Swiss Army EA. I've designed it so that it can manage orders in your MT4 terminal using a large variety of methods. Features includes breakevens, trailing stops, setting/removing for takeprofits and stoplosses, and many close-out conditions; you also have ability...
I took a 3 months VPS subscription and have also subscribed to a signal. When trying to migrate my signals and chats I am getting an error that Migration is failed. Attaching screenshots for your reference
I designed a simple EA using Moving Average Indicator. I want to find out the best MA Period which my EA gives back better results
I've looked into TimeCurrent() as well as CDatetime and I can't seem to figure out to determine the number of seconds elapsed in a day. I like TimeCurrent(), but I would prefer to have only the time without the date. I need to obtain the number of seconds elapsed as opposed to just the time as a
In MT5, there is a checkbox to select the "Show trade history". It is the last item on the tab "Show" of the properties window of a chart (click F8). I would like to know, how I can (de)select this property by code (in mql5)! - Usually, I would expect to use the functions ChartSetInteger() and
Hi All! Drazen Penic said in Drazen Penic : Stop loss and take profit in the MqlRequest struct are prices, not a number of points or pips. sl Stop Loss price in case of the unfavorable price movement tp Take Profit price in the case of the favorable price
Hi, I was trying to optimize my expert advisor. I was surprise to see the results i got were absolutely nonsense (the optimization results were showing no case could bring profit despite the fact i know a parameter that should be tested is making profit). So i noticed the optimization was "stopping
Hi All, I want to adjust my code to reference a past time and date. Is it possible to reference the last open? So Today -1 and server time = 16:30. I currently am coding it manually. Current Code - extern double BuyPrice=2972.10 Ideal Code - extern double BuyPrice=(Today -1 - 16:30) Thanks
//+------------------------------------------------------------------+ //| buytest.mq5 | //| PAOM | //| |
  EA opens only Buy Orders (13   1 2)
Hello, I coded a simple EA based on one indicator which uses inidcator values from the current chart and the H4 chart. During the Backtest it came to my intention, that the EA only opens Buy Orders. When I change the code to only Sell Signals, it doesnt open any Trades. Does someone have an idea why
Hey, I have an EA that gets the Stack Overflow error if I don't put a Sleep of something like 1 second. I do have a loop that calls itself (something like an infinite loop) but I need to find a way to do this and not get the Stack Overflow error. The infine loop is something like this: My EA...
sI wanted to launch my product, but it cannot pass verification. The test run my robot on NZDUSD and failed by having no operations. However, my robot is designed for EURUSD. How can I have the test run on pair EURUSD only? My Error file is attached. <<<<<<<<<<<<< Updates I added the following code
Hi. How can i get the ticket of an position and close a the position? whats wrong in Code ? InThe Code, I Open a position and immediately (after 10 seconds) i want to close it. //+------------------------------------------------------------------+//|                                           test...
Hi all, I try to (partly) code my manuel trading strategy to be automated, but 1) it doesnt open any trades 2) with the backtest it opens two charts H1 and H4, but for the stragey it only needs to check the value of the indicator on a H4 chart 3) during the backtest I get the Errorcode "OnTick
I've experimented a strange behaviour on VPS side upon EAs migration. Actually I don't know whether it is an issue or the normality. In few words, I've an EA which create many files if and only if they do not exist and it works fine locally, i.e. if I start it twice, the first time the files are
Hi, I have a problem with my EA. It's calculateting the 21,13 and 8 eMA and it should give a Buy signal if the 8 - 13 - 21 are on top of each other in this sequence and a Sell signal if they are beneath each other. I hope that you get what i am trying to say. The thing is it works if i check for a
Let me ask my question with an example, Let's say the current price of EURUSD is 1.09000 and I want to buy a long position when the price hits at 1.09100. In point of view of slippage, which of the following two options would be more advantageous on the average? 1. Entering a pending buy order at
Hello, I coded an EA which runs perfectly but places multiple trades instead of one. Using the most currently opened order as reference point, the EA is meant to open 1 Buy order when price increases by 100 pips and open a Sell order when it decreases by 100 pips. However, if the most currently
Hello everyone, I am cracking my head here. My code simply does not execute the SL or TP orders. They appear on the testing graph, but they are not executed. Can anybody help, please? Thanks. //IMPORTAÇÃO #include<Trade\Trade.mqh> //cria instância chamada "trade" CTrade trade; input int lote = 12