Expert Advisors and Automated Trading - page 9

To post a new topic, please log in or register
Hello Imagine that you do not want to lose much in a position and you program that limit to an Expert, so that, when a position reaches or exceeds that negative value, the position is closed. The problem is: if the Expert Advisor opens a position whose Profit is already below that limit, it will
Hi I’m new to this platform and trading. So bear the newish question. I noticed in MT5 the MACD signal line is based on SMA. How do I go about calculating the MACD Signal line value based on EMA. I just am after the current value. I’ve read other posts about this but I am still confused. Some people
I've been coding EAs for a few months now, and using different indicators to detect trends. Eg multiple moving averages combined with ADX, or RSI combined with Bollinger bands. In the forums, I often see people discussing using "MTFs" (multiple time frames) for their trading systems and EAs. How
Hello everyone. I am using a custom indicator, but ever since I added it to my code, the backtesting did not run at all. How can I improve the code? Or is it even from the indicator this slowness? Best regards. //+------------------------------------------------------------------+ //|
Hi, just got started using MQL5 and wanted to test some indicators in an EA. When I tried testing it using the "minute" time frames (1min, 5min, 30min), the indicator appears on the chart as the backtest runs. However, when I shift it to the "hourly" or "daily" time frames, the strategy tester does
Hi I made EA depend on moving ravage cross down and cross up and small crosses not taken the problem is the orders not come in sequence buy sell buy sell ... some time come buy buy sell or sell sell sell.. how can I make the orders in sequence sell buy sell buy.... thanks
Most of EA's work bad way, when using indicatros levels for opening trades. Let's use RSI as example: Buy 30 Sell 70 All fine but, many, many times the price goes wrong direction as our indicator wat... I need script for RSI or W%R On Set levels No 1 - open pending orders, and open trades when the
In the code below: for ( int j= 768 ; j< 780 ; j+= 1 ) // 768dec=300H, 1024dec=400H { string strTemp= StringFormat ( "%I64X" , j); strTemp= " \xF" +strTemp; Print (strTemp); } I get this result
What I am essentially asking is if there is any sort of indicator or script that I can apply to a chart to turn it from a standard candle/bar chart into a Renko or Heikin-Ashi chart (which aren't available by standard in MT4/MT5 as far as I am aware) and then allow an indicator based EA to make
Hi, I'm a newbie in MT5 EA programming, wondering if anyone can give a hand on the below question, Appreciate for your valuable time inadvance! Here I'm going to get the equity value change per tick price update, And my test code is below if(log_enable)Print(name ,"\t",SymbolInfoDouble(name
I was try to install the Expert on the Market but with the price and rent price I m not come out. Invalid price. Rent must be cheaper than purchase. Longer rent must have higher price. Expert cost 589 USD for sale and 31,00 for rent and I get this answer! Invalid price. Rent must be cheaper than
Hi, I've been running backtests with optimization, and it's been great a tool to analyze my EA's performance. Today i just noticed that the number of results are less than the number of combinations I expected, especially with more complex tests (with more optimization variables). For example, my
Automatic validation gives No trading operation when in upgrade the EA
Hi, Using an EA , I'm opening a SELL position and then retrieve the order type. But strange enough when I read the POSITION_TYPE it says it's a BUY position !!!! What's wrong ? #include <Trade/Trade.mqh> CTrade myTrade; //my trade object //--- int OnInit () { double v_Bid =
The EA seller English is weak and he did not understand my question thanks for any response
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
Hi All, This is slightly a different type of request. I've got an EA coded and trying to test it on strategy tester , however my PC is so slow and cannot handle it. I was after a 3 year backtest to see how this strategy performs. Could someone kindly run a backestest for me on this EA so I can gauge
back testing optimization in MT5 either let's you back test a single currency to find the best input parameters or it let's you back test all the symbols in the market watch tab but with the default input parameters. Is there a way to back test all the symbols in the market watch and find the best
Hi, I reported this issue already one year ago to MetaQuotes but never got a helpful response. Sometimes - don´t ask me when - a simple execution of functions like iClose(), iTime() or CopyRates(), CopyTime() whatever takes more than 30 seconds until the code-pointer returns. And of course, when you...
  Hard SL to EA (2)
I bought an EA, it was designed to have an automatic SL and TP. However, when I tried to alter the SL/TP manually, the EA corrects it after. It was a good EA, but the SL are too far, which is too risky for me. So I am looking for some help, or whether the mql5 market has the solutions
Hi, I couldn't find any satisfying solution, so I created my own, maybe it will be useful for someone, will be glad for any feedback. Tested with online calculator on multiple pairs, and looks like it works. class PositionSizeCalculator { public : double Calculate( double risk, double
helo I am facing a very weird problem and I dont know how to work around it. basically I have created an expert and I want to debug it, so I have compiled it with zero errors. When I test it using the strategy tester it does run it ok without any problems. But when I try it using the metaeditor...
Hello Folks, I'm very new to MQL programming. I just start coding to write LAST TRADED PRICE in external text file. All my effort are failed. Below is my code. Can anyone please correct my code. //+------------------------------------------------------------------+ //|
Guys I have no ideia why I cant make this simple operation in my EA code work. I first tried to compare the doubles of both prices but I realized that there is something tricky about comparing doubles so I decided to apply some math instead but still cant make it work. Please Help. double H3 =
Hello everyone, I have an protected indicator which I cannot find its output number to import it in my EA. It shows some number in a graphic window but it seems it has no output. I usually see indicator's numbers in Data window but it has no number shown in it(attached photo). I also try every
I have been trying to open a chart (CChart) during the "int OnInit()" phase of my EA. It doesn't work. I tried using the old MT4, non object oriented, version of this function, ChartOpen, and still no joy. I get an error ID. I can't find any more documentation or example code on this anywhere. This
Hi, I am currently finding couple of things which don´t seem to work proper in tester, but which surely should. 1. ObjectSetInteger(chartid, name,OBJPROP_ALIGN,ALIGN_CENTER)); - has no effect in tester, all edit fields have left alignment 2. ObjectSetString(chartid,name,OBJPROP_TOOLTIP,"Tooltip"); -
Hi there, I am trying to test simplest EA which only buy's a stock at a specified price. But when I do strategy test, I get no result and seems there is a problem in my code. May you help me to know is my code a complete robot or what is the problem? Thanks in advanced!...
Hello everyone I am looking for semi automatic hedging EA that would open an opposite trade (after I manually initiate one) that opposit trade would be pending order with double or triple the original trade size (could be designated in the parameter) and far from the original trade by number of pips
Hey everybody, Which spread do you recommend when backtesting - current or a particular fixed number? I'm looking for a starting point that I can tweek later depending on the EA, parameter to be optimized (here I usually use profit maximum and maximum drawdown) and currency pair. Thanks! :)