Expert Advisors and Automated Trading - page 325

I want to test some code I just wrote but I can't because automated trading has been disabled. Thoughts
I am a beginner in coding. I can make two function to open two trades. However, I want to make it so that first trade is open, then a second trade would come in. And if the second trade is closed while the first trade is still open, it would not open a second trade again until the first trade has...
Hello guys,  i need a exact simple code in order to close positions opened after 2 candles or 3 , where meet a condition also. i dont have any knowledge in programming would appreciate your help ! 
Hello, because I have a lot of problems with Metatrader5 installed on Ubuntu 16.04 LTS, through the last updates of Wine, I'd want to ask if it is possible to directly use the Webterminal of Metatrader5 also with the expert advisors, those I find on the market or that I develop by myself. If...
Mql5 CopyTime reference website tells me this: "The function gets to time_array history data of bar opening time for the specified symbol-period pair in the specified quantity. It should be noted that elements ordering is from present to past, i.e., starting position of 0 means the current bar." So...
[Deleted]
  Useful money management expert  (49   1 2 3 4 5)
Hi everyone, As any real trader knows money management is a key part to successful trading. I have spent many hours coding the expert below and have decided to share it with the forum as a thanks for all the knowledge I have obtained from it over the years. This is not an auto-trading expert, it...
  EA Loss Recovery  (1)
So I have seen on the mql market with some different GRID systems, that during backtesting, the EA can be used manually with a buy/sell/close button. Once the button is hit, the EA takes over and places the orders and acts properly.  Im curious if the same thing could be done with a Loss Recovery EA...
  ExpertMoney.mqh  (2)
Hi All, I tried to understand ExpertMoney.mqh. Is there someone who can explain this part of that class? Even if we are using a derivated class and if we are surcharging CheckopenLong and checkOpenClose, according to me the end of thoses functions should be : .... if(lot<m_symbol...
Hey Guys, I was wondering if someone could help me I am after a ea or script that can alert or close all orders at a certain level of profit or loss. I have spent hours looking through this site and couldn't find anything, any help would be greatly appreciated. Cheers PS  it needs to be for mt5.
Hello , I'm looking everywhere but I couldnt find it. Strategy Method; Simple Crossover Buy / Sell And Buy Close / Sell Close Eur usd H1 5 Day Moving Average Linear Weighted - Close And 9 Day Moving Average Simple - Close . I do not want filter stop tp etc ... Only Cross Moving Average strategy, I
[Deleted]
how can i pause an optimization in mql5 that i've been doing on a robot that i1ve created, the ideia is that if i wanna continue it in other computers i can without losing the previous results already calculated. thanks !
[Deleted]
I want to make my ea to clean optimization cache (Clean tester\cache folder) Anyone knows how to do that?
Hello all, I am attempting to use arrays to get data. void TestReadCsvFile() // Arrays = OpenPrice,ClosePrice,PriceHigh,PriceLow,PriceHigh,TotalVolume {    FileHandle=FileOpen(subfolder+"\\GOLD.csv",FILE_READ|FILE_WRITE|FILE_CSV);    if(FileHandle!=INVALID_HANDLE)      {       while(...
[Deleted]
I know it may be a silly question but I want to know if there's anyway to set values to the Boolean function rather than True or False  for example I want it to be up or down in the external parameters 
Hello, I am looking for a tool or utility that tells me instantly when one of my VPS is down or disconnected from my trading account. Can someone please give advice? Please PM me, too. Regards Christian
Why is it that when I do a back test, I get proftis and losses that are different from mt SL and TP.  I am testing a very simple MA cross EA with no trailing stop or anything like that.  I have it set at a stick SLand TP and my results don't reflect that....
posted this question under General, but this seems like a better place... I'm creating my first EA following the instructions in MQL5 Wizard: How to Create a Module of Trading Signals My init function gets called and returns true. I set a break point in CheckOpenLong but the debugger never...
One of my EA Indicators: Custom McGinley Moving Average Built Into This EA Indicator: NonRepaint Slope NeutralZone SignalOnlyOnColorChange TradeExitOnlyOnColorChange and more
Can I programmatically clear the StrategyTester journal on the start of my backtest run? Thanks.
I am aware that there is a script to stop all trades and close out all positions in MQL4. But I am not aware of such code's existence in MQL5. I couldn't find such script in there - where should I find such script which will stop all trades and close out all positions, or will the code from MQL4...
Hello, I'm currently programming an EA and want to implement a trailing-StopLoss. If an order is open the SL is calculated for the current bar and plotted on the chart. The SL is to be recalculated for the following bars. If the price is exceeded or undershot, the order should be closed. How is this...
Good Day everybody... Hello, I've been searching on the forum but I cant find what i'm looking for. The strategy is .. Let say I'm open a BUY position with 0.01 lot ..(  eg. I place a BUY at a price 0.74854 ) At the same time I want to place SELL STOP with 0.02 lot ( eg. I place a SELL STOP at a...
[Deleted]
I want to close buy and sell at a price with tp / sl. Can you do that?
Hello, a simple problem here, if you are an expert you will find this problem within seconds....my indicator always gets error "Array out of range" when trying to test it. I just dont know why... #property indicator_separate_window#property indicator_buffers 3#property indicator_plots   3#property...
[Deleted]
Hello ,  I ask about the difference between those 2 function  if we use them for the same target like fetching spread for example : MarketInfo(Symbol(),MODE_SPREAD  ,,,,  SymbolInfoInteger(Symbol(),SYMBOL_SPREAD) Thanks
  Bars in EA  (1)
Hi All, Could you please explain me what is the impact when i used 4 hours bars in the EA and the EA is executed on 1 hour bar Thanks in advance.
Is possible to use pointers to basic data types like int, long, double, etc.? There are many excellent libraries of C functions and it is very frustrating and disappointing to get a default C code and try to convert it to MQL, in addition to being very tiring. Examples of pointers in standard C:...
Im trying to update my Published EA but it says the error. I already tried to compile it with the metatraderbeta.ide with no errors on code on it but still the same error on uploading can anyone know how to troubleshoot this problem?
A year ago I download a free program EA which works great on my PC. EA I copied to the laptop but not working. New EA is now for rent. How to copy EA on a laptop? I have just EX4 file.
Hi, I have updated the MT5 to 1595 version and now I have pb with backtesting (in demo no, it's ok). The problem is in OnTradeTransaction when I call the HistorySelect. This leads to a block of execution That is a code sample void  OnTradeTransaction(    const MqlTradeTransaction&    trans...