Expert Advisors and Automated Trading - page 112

To post a new topic, please log in or register
  Trailing Stop (1)
Can someone please give me an example of how to use the MQL5 built-in class TrailingFixedPips ? I tried the following: #include <Trade\Trade.mqh>#include <Expert\Expert.mqh>#include <Expert\Trailing\TrailingFixedPips.mqh>input string Expert_Title = "toets8";ulong...
Hi there, I'd like to know any MQL4/5 function to get commission fee before open order. Thanks in advance.
Hi, everyone, I am developing expert advisor. But there is an "invalid volume" problem in my coding. Below is the method I learn and think at mql5 articles. //+------------------------------------------------------------------+//| Check the correctness of the order...
Hi, I'm trying to get a formula to calculate trade lotsizes based on stop loss and a % of the account to risk. I know this has been asked a million times but I still can't get a formula to work. It will need to calculate the value based on conversion to the account currency...
Ola pessoal estou tendo dificuldades com a leitura de um arquivo TXT, peguei um programa q ja faz isso porem por algum motivo na hora da leitura dos dados a funcao entra em loop infinito. Poderiam me ajudar com o problema ou postar algum codigo exemplo. segue a baixo o ponto q entra em loop...
Is there a way to calculate the Average number of Pips per tick? I am new to coding in MQL4. I would like to check in my code if there is a sudden fast movement against my trade and close it out if true. Should I use the spread?   Thanks for any assistance. 
Hello all,  I just opened a new signal, but leverage on my account was 1:1000. Then I see that signal is not for sale because max. leverage allowed is 1:500. I change the leverage, and signal was still not for sale. So I delete it and change leverage on my account to 1:500 and create the same...
  chart objects (5)
Hello, Some of the objects that typically appear in Strategy Tester are not appearing in my live account. More specifically,  the entry arrows do appear but the exit arrows and the lines joining the entry and exit arrows do not appear. Also, the red dashes that mark the stop loss price and...
Hello,   The problem is, only, the back test for long period (like 5 years back) takes very long time not hours but days in back-testing... is it normal?? any solution/suggestion?   Thanks 
Hi All. I am a amateur trader for 4 years and still trading manuel. According to my  technical system  ı need to enter conditional sequentional pending order. For example. Step-1- First order:Pending buy (dont use limit order) order  with SL and TP Step-2 İf First...
Hi, Compilation : 0 error(s), 0 warning(s), compile time: 2485 msec 1 1 Attachement to a chart : 2016.05.26 18:16:13.167 MTea invalid EX5 file (533) Previous attachement to the same previous chart : successful. Any idea ? PS 1 : After check, all EA compiled from...
Hi Every One; I need to write a code to open trade as the following: I open the trade by end of the candle so I open sell if the close price more than the open price, and I open Buy if the close price less than the open price. so if I use the one hour chart , and the last price or the close price...
my robot is need h1 and h4 and D1 trend in same time, but I cannot any setting for this in strategy tester , can you help me?
I want a Expert to make the indicator changes color when the I open trade in the same currency close  
I'm not sure is it right or wrong? i try on backtest. i think it's strange. for example :  if pips loss below -5000 points. i want to set stoploss when rebound again it has to stop at -1000 points.   if pips loss below -10000 points. i want to set stoploss when rebound again it has to stop at -2000...
Hi all, What are the methods to retain a variable value if mt4 was restarted? i can only think of either 1. storing the information in the comment of an order 2. save the info in a csv file and read it back later Thanks 
QUESTION 1: I got a problem with OrderSend. The order was executed in  150063.782 ms It's too much. Take a look at the log: (I ommited the account and change the deal number on this log for security reasons..) OP 0 13:46:06.258 Trades '00000':market sell 1.00 EURUSD KJ 0 13:48:36...
Hi all,  I read somewhere we can draw trendline in indicator but the information is still very vague for me  Need help to clarify a few things   1. I assume it is true you can draw trendline with mql4. do we use obj_trend for this? 2.  is it possible to write an EA whereby...
Hello, can everybody help me. How can I close all open trades at a certain time. I want to close all open trades at 7 clock. I need this code for mt5. I hope that everybody can help me. Thanks.
Hi, does someone has information about the possibility to load the Event Calendar from MT5 into an EA Script? Would be nice if anybody could help me with that.   Thanks. tMAE 
I have an EA which uses the OnTimer event and works just fine on my accounts with two brokers.  However, I have just opened a RoboForex account, and the same EA is not working because the OnTimer event handler is not being hit (added debug code proves it).  Has anyone else had this problem or is it...
How is it the best way to create a restriction ? (expert, script) Assuming that I will be trading (not a robot) - In the beginning of the day I can choose my limit loss equity and max tolerance. - If I lost a trade, and my equity is lower than my limit loss, the software don`t allow to open new...
Hi, I need help with to close an order by 2 condition in addition to SL,TP, TS. int doWhat = _doNothing;      double hull_trend_current  = iCustom(NULL,0,"StepMA pdf 4_6",PERIOD_CURRENT,"",PdfmaLength,SensivityFactor,ConstantStepSize,PdfmaVariance,PdfmaMean...
Hi I have a mql4 EA so I have the source Please how to add 1 variable, that, if true, ALL shorts become longs, and all longs, shorts? So where it would have long, it shorts, and where it would have short, it longs. We don't touch TP, SL, and other rules.  Thank you for your help! 
I have downloaded this indicator https://www.mql5.com/pt/code/576 Can the MT show an alert or message when the trend is Up or Down? The code is attached.
Great people! I need a help: did anybody tackled this? : MT4 multicurrency backtesting in tester environment: Im thinking that EA could write comments in .csv about what trading decisions it would do.. while it can really only trade one currency pair in the MT4 Tester...so I can collect account...
hi everyone i tried linking my demo account with FX Junction on MT4 , on first day it worked well but on next day its giving an error " FX Junction Bridge USDCHFm,H1: Failed to connect, please try again later (error code: 816)" I TRIED TO RE ATTACHED THE ea but no success, i tried to contact the...
Hi, My VPS shows a nice ping with my broker, but sometimes ... there's lag. So I want to be able to check the ping, TERMINAL_PING_LAST do it. But in which circumstances does the terminal ping the server ? Plus, if only when connecting, is it possible to reping it ? Thanks
mniians
I'm having trouble getting trading signals on my Mac. I've downloaded PlayonMac in order to download MT4, but still can't seem to get the signals to work
Hi. I bought my first EA from the Market and was able to install it on 1 PC. I want to activate it again on my other PC and on my VPS. How do I reactivate and re-download the same EA for my other PCs? Thanks for any help.   Fiil